Hey can anyone please help?
I making this form on my website and I have two drop down lists, one is for sizes and the other is for colors. They both have an option for "other" and I'm wanting a textbox to appear when "other" is selected. I got the first drop down to work but I can't figure out how to get the second one to work without messing with the first. Here is the code I have please help:
<form name="form1" method="post" action="">
<script type="text/javascript">
function showfield(name){
if(name=='Other')document.getElementById('div1').innerHTML='Other: <input type="text" name="other" />';
else document.getElementById('div1').innerHTML='';
}
</script>
<p>Size:
<select name="size" id="size" onchange="showfield(this.options[this.selectedIndex].value)">
<option selected="selected">Please select ...</option>
<option value="1' H X 6" W">2' H X 1' 6" W</option>
<option value="1' H X 2' W">1' H X 2' W</option>
<option value="1' H X 1' 4" W">1' H X 1' 4" W</option>
<option value="Other">Other</option>
</select>
<div id="div1"></div>
<p>Color:
<select name="Color" id="Color" onchange="showfield(this.options[this.selectedIndex].value)">
<option selected="selected">Please select ...</option>
<option value="Walnut Stain/Dark Brown">Walnut Stain/Dark Brown</option>
<option value="Tan">Tan</option>
<option value="Walnut">Walnut</option>
<option value="Other">Other</option>
</select>
<div id="div1"></div>
</p>