A Popup Menu - JxPharmacy - Doc JavaScript | 2
Code (A Popup Menu)
<SCRIPT LANGUAGE="JavaScript">
<!--
// Copyright (c) 2000 internet.com Corp.
// https://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.
function load(form, win) {
// menu - a reference to the select object
// win - a reference to the window object
win.location.href = form.menu.options[form.menu.selectedIndex].value
}
// -->
</SCRIPT>
<-- Example 1 -->
<FORM>
<SELECT NAME="menu" onChange="load(this.form, window)">
<OPTION VALUE="https://www.webreference.com/3d/">3D Animation Workshop
<OPTION VALUE="https://www.webreference.com/js/">Doc JavaScript
<OPTION VALUE="https://www.webreference.com/dlab/">Dmitry's Design Lab
<OPTION VALUE="https://www.webreference.com/dhtml/">Dynamic HTML Lab
<OPTION VALUE="https://www.webreference.com/outlook/">Internet Outlook
</SELECT>
<INPUT TYPE="button" VALUE="Load" onClick="load(this.form, window)">
<!-- or change "window" to "parent.frames[i]" for a frame target -->
</FORM>
<-- Example 2 -->
<FORM>
<SELECT NAME="menu" onChange="load(this.form, window)" SIZE="3">
<OPTION VALUE="https://www.webreference.com/3d/">3D Animation Workshop
<OPTION VALUE="https://www.webreference.com/js/">Doc JavaScript
<OPTION VALUE="https://www.webreference.com/dlab/">Dmitry's Design Lab
<OPTION VALUE="https://www.webreference.com/dhtml/">Dynamic HTML Lab
<OPTION VALUE="https://www.webreference.com/outlook/">Internet Outlook
</SELECT>
<INPUT TYPE="button" VALUE="Load" onClick="load(this.form, window)">
<!-- or change "window" to "parent.frames[i]" for a frame target -->
</FORM>
Created: November 6, 1997
Revised: December 4, 1997
URL: https://www.webreference.com/js/pharmacy/menucode.html