...

View Full Version : <option>other</option> pops <input type="text">



ShMiL
02-21-2003, 10:33 AM
Do you know those forms that let you choose from <select> options and also gives you the option to put your on text (usually once you select the "other" option)?
Can someone refer me to one of these forms so I can sniff?
Thanks!

Spudhead
02-21-2003, 01:04 PM
It's usually as simple as having a hidden (style="display:none;" if you're IE-only :)) div with your textinput in, and calling a function onChange of the selectbox that sets the display to visible depending on the value. Or you can change the innerHTML. I guess you could put the div over the selectbox if you wanna get all snazzy. :)

ShMiL
02-21-2003, 01:26 PM
I didn't understand this last sentence: "Or you can change the innerHTML. I guess you could put the div over the selectbox if you wanna get all snazzy. "...
And, is there way to make it compatible for both IE and Netscape?
Thanks.

ShMiL
02-21-2003, 04:11 PM
Anyways,
1. How can I change the style="display:none;" to the opposite using JS?
2. What is the opposite in this case (for display:none)?
Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum