A Popup Menu - JxPharmacy - Doc JavaScript | 2 | WebReference

A Popup Menu - JxPharmacy - Doc JavaScript | 2

Code (A Popup Menu)

<SCRIPT LANGUAGE="JavaScript">
<!--
// Copyright (c) 2000 internet.com Corp. 
// http://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="http://www.webreference.com/3d/">3D Animation Workshop
<OPTION VALUE="http://www.webreference.com/js/">Doc JavaScript
<OPTION VALUE="http://www.webreference.com/dlab/">Dmitry's Design Lab
<OPTION VALUE="http://www.webreference.com/dhtml/">Dynamic HTML Lab
<OPTION VALUE="http://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="http://www.webreference.com/3d/">3D Animation Workshop
<OPTION VALUE="http://www.webreference.com/js/">Doc JavaScript
<OPTION VALUE="http://www.webreference.com/dlab/">Dmitry's Design Lab
<OPTION VALUE="http://www.webreference.com/dhtml/">Dynamic HTML Lab
<OPTION VALUE="http://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>

http://www.internet.com

Created: November 6, 1997
Revised: December 4, 1997
URL: http://www.webreference.com/js/pharmacy/menucode.html