/    Sign up×
Community /Pin to ProfileBookmark

Forms: drop down menu question

I am designing a form. I have a drop down menu, one of the selections is “other”. what code do I need to add to the “other” option to make a text field appear when “other” is selected and only when “other” is selected???

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@yaronamirNov 01.2009 — you need to add onchange event to th e select input

and check something like this

onchange="checkOther(this.value)"

funnction checkOther(val){

if(val=="other")

document.getElementById("yourOtherInputID").style.visibility = 'visible';

}

P.S.

you need to add to the "other" input style="visible:hidden"
Copy linkTweet thisAlerts:
@donatelloNov 01.2009 — I did it here.

Just look through my code and it does exactly what you want. ?

http://www.webdeveloper.com/forum/showthread.php?t=205403

Open that page with IE to see the solution. It will not be visible with FF or other browsers. ?
Copy linkTweet thisAlerts:
@shadowviper83authorNov 02.2009 — Im not familiar with this code, i looked at your source but couldnt find the part i am looking for??
×

Success!

Help @shadowviper83 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 6.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...