i need a text input area for a form to appear only if 'other' is selected
on drop down select list?
Well my question is pretty simple and straight forward. The html for the
drop down list is easy enough here is the script and html that i found to
use
<select id='combo'>
<option>Yes</option>
<option>No</option>
<option>other</option>
</select>
<input id='text1' style='display: none'/>
<input id='text2' style='display: none'/>
<script>
document.getElementById('combo').onchange = function() {
var display = this.selectedIndex == 2 ? "inline" : "none";
document.getElementById('text1').style.display = display;
document.getElementById('text2').style.display = display;
}
</script>
how do i go about applying this? if of course, this even works...
thanks
No comments:
Post a Comment