Hyperlink a drop down selection - 3/21/2001 13:16:00
Can I hyperlink a drop down box selection. Outfront uses a "Go" button. But I'd like to have a selection linked so that just by making a selection the link activates.
Thanks, Gerald
Thomas Brunt
Posts: 6118 Joined: 6/6/1998 From: St. Matthews SC USA Status: offline
RE: Hyperlink a drop down selection - 3/21/2001 16:29:00
<form name="AutoListBox"> <p><select name="ListBoxURL" size="1" language="javascript" onchange="gotoLink(this.form);"> <option value="URL#1.htm">Place 1 </option> <option value="URL #2.htm">Place 2 </option> <option value="URL#3.htm">Place 3 </option> <option selected> -- Select to Jump -- </option> </select></p>
The Function that makes it work :
<script language="JavaScript"> <!-- function gotoLink(form) { var OptionIndex=form.ListBoxURL.selectedIndex; parent.location = form.ListBoxURL.options[OptionIndex].value;} //--> </script>
</form>
Be sure to paste code examples into notepad and then copy/paste from notepad into FP html mode.