Hey guys,
I have a drop-down box which lists manufacturers of computer products. I want it so that when a user clicks "Other" from the drop-down box, a new input field appears below it which asks them to specify an alternative manufacturer.
<select name="cat" id="cat" onchange="setCategories();">
<option value="components">Components</option>
<option value="pcs">Desktop Computers</option>
<option value="laptops">Laptops/Netbooks</option>
<option value="monitors">Monitors</option>
<option value="drives">Internal Drives</option>
<option value="network">Cables/Networking</option>
<option value="servers">Servers</option>
<option value="software">Software</option>
<option value="accessories">Other/Accessories</option></select>
<select name="manufacturer" id="manufacturer">
<option value="man">--Manufacturer--</option>
<option value="dell">Dell</option>
<option value="ibm">IBM</option>
<option value="other">Other</option>
</select>
<!-- MAKE INPUT FIELD APPEAR HERE AFTER "OTHER" SELECTION -->
I know it is to do with the "onchange" attribute of the manufacturer input field, but I am new to JavaScript and don't know what code is required for the function to do this. Can anyone point me in the right direction?
Thanks in advance!