/    Sign up×
Community /Pin to ProfileBookmark

onchange and hidden

can I change this to if I select other then curriculum show other wise display no
<select name=”curriculumList” onchange=”this.form.curriculum.disabled=this.value==’Other’ ? false : true;”>
<option selected value=”#”>— Please select —</option>
<option value=”PHD”>PhD</option>

<option value=”Other”>Other</option></select>
<input name=”curriculum” type=”text” disabled=”true” size=”20″ maxlength=”20″/>

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@FangJan 29.2010 — &lt;select name="curriculumList" onchange="this.form.curriculum.style.display=(this.value=='Other')? '' : 'none';"&gt;
Copy linkTweet thisAlerts:
@HJCauthorFeb 19.2010 — Thank you Fang.

but If I also have value like <option selected value="#">--- Please select ---</option>, can I have if the value is # or other

the curriculum text field get hidden

<input name="curriculum" type="text" size="20" maxlength="20"/>

thank you!?
Copy linkTweet thisAlerts:
@FangFeb 20.2010 — &lt;select name="curriculumList" onchange="this.form.curriculum.style.display=(this.value=='Other'||this.value=='#'))? 'none' : '';"&gt;
Copy linkTweet thisAlerts:
@HJCauthorFeb 22.2010 — &lt;select name="curriculumList" onchange="this.form.curriculum.style.display=(this.value=='Other'||this.value=='#'))? 'none' : '';"&gt;[/QUOTE]

Thank you so much !!
×

Success!

Help @HJC 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.25,
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,
)...