View Full Version : <option>other</option> pops <input type="text">
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?
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. :)
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?
02-21-2003, 04:11 PM
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)?
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.