G
Guest
How can I code a dropdown form to open the href in a new window (_blank)?
Here's an example of my form, but the "_blank" doesn't work (nor does the
"alt").
<form>
<select onChange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>Select a pest...
<option
value="http://www2.tltc.ttu.edu/thomas/classPet/1998/antfarm/ants_spices.htm#carpenter" alt="Redirect to Texas Tech University" target="_blank">Ants
<option
value="http://www.uky.edu/Agriculture/Entomology/entfacts/struct/ef614.htm">Roaches
<option
value="http://www.ipm.ucdavis.edu/PMG/PESTNOTES/pn7475.html">Silverfish
<option value="http://agnews.tamu.edu/stories/ENTO/termite.htm">Termites
</select>
</center>
</form>
Here's an example of my form, but the "_blank" doesn't work (nor does the
"alt").
<form>
<select onChange="if(options[selectedIndex].value)
window.location.href=(options[selectedIndex].value)">
<option>Select a pest...
<option
value="http://www2.tltc.ttu.edu/thomas/classPet/1998/antfarm/ants_spices.htm#carpenter" alt="Redirect to Texas Tech University" target="_blank">Ants
<option
value="http://www.uky.edu/Agriculture/Entomology/entfacts/struct/ef614.htm">Roaches
<option
value="http://www.ipm.ucdavis.edu/PMG/PESTNOTES/pn7475.html">Silverfish
<option value="http://agnews.tamu.edu/stories/ENTO/termite.htm">Termites
</select>
</center>
</form>