/    Sign up×
Community /Pin to ProfileBookmark

enable certain options only if others are picked

im wondering, is it possible when you are makeing a generator, to only enable certain options if others are picked

[url]http://www.boomspeed.com/eevailen/cssgenerator.html[/url]
example, if a user didnt pick the banner or the space tags, is there a way to get the (right now hidden tags) i class=banner and i class=return disabled?
could i do this by making them visible radio buttons that somehow click when the other is enabled and go away when they arent? or something?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@JonaMar 26.2003 — The server doesn't work, so I couldn't view the Web page. But are you asking that if(thisRadioButton.checked){ this.formItem.disabled=true} ?
Copy linkTweet thisAlerts:
@eevailenauthorMar 26.2003 — sorry, boomspeed gets a little slow at times, this is what it sorta looks like on the page:

Background URL [area to put stuff in]

Properties [area to put stuff in]

Base Font Color [area to put stuff in]

BANNER [area to put stuff in]

Banner Height [area to put stuff in]

Banner Width [area to put stuff in]

Banner TOP Position [area to put stuff in]

Banner LEFT Position [area to put stuff in]

LINK Color [area to put stuff in]

Link Hover color [area to put stuff in]

VISITED LINK [area to put stuff in]

BOLD color [area to put stuff in]

ITALICS color [area to put stuff in]

Userinfo Table BG [area to put stuff in]

2nd Table BG Borders [area to put stuff in]

2nd Table BG [area to put stuff in]

2nd Table Properties [area to put stuff in]

Space [area to put stuff in]

then 2 hidden format tags, one that generates an <i class="banner"></i> for the banner and an <i class="return">for the space code. Im wondering if these can be disabled if the user doesnt want a banner (aka leaves/deletes the form blank) instead of being abled all the time
[CODE]
<!-- Begin
function create(form) {
if (confirm("Ready?")) {
form.pingy.value = "CSS Generator n" +
"Copy this into your userlookup nn" +
" <style type="text/css"> n";
if (form.backg.value != "") {form.pingy.value +="body{background:url(" + form.backg.value + ")";}
if (form.prop.value != "") {form.pingy.value +="" + form.prop.value + ";";}

ect all the way to

if (form.spc.value != "") {form.pingy.value +="<i class=" + form.spc.value + ">Use this when you want to go to the next line</i>n";}
if (form.ttk.value != "") {form.pingy.value +="<b class=" + form.ttk.value + ">Type all you want here</b>n";}
}
[/CODE]
Copy linkTweet thisAlerts:
@JonaMar 26.2003 — Yah...

function create(form) {

if (confirm("Ready?")) {

form.pingy.value = "CSS Generator n" +

"Copy this into your userlookup nn" +

" <style type="text/css"> n";

if (form.backg.value != "") {form.pingy.value +="body{background:url(" + form.backg.value + ")";}

if (form.prop.value != "") {form.pingy.value +="" + form.prop.value + ";";}

//ect all the way to

if (form.spc.value != "") {form.pingy.value +="<i class=" + form.spc.value + ">Use this when you want to go to the next line</i>n";} else { form.pingy.value+="/*You did not want a banner*/"; }

if (form.ttk.value != "") {form.pingy.value +="<b class=" + form.ttk.value + ">Type all you want here</b>n";}

else { form.pingy.value+="/*You did not want a space*/";}

}
×

Success!

Help @eevailen spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...