| | |||||
| ||||||||
| CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | Simple JavaScript pull down quick menuCode: <SCRIPT LANGUAGE="JavaScript">
<!--
function which(form)
{
var order=form.jump.selectedIndex
if (form.jump.options[order].value != 0)
{
location=form.jump.options[order].value;
}
}
//-->
</SCRIPT>
<form name=form1>
<select name=jump onchange=which(this.form)>
<option value=0 selected>Quick Menu</option>
<option value="page1.html">Page 1</option>
<option value="Page2.html">Page 2</option>
<option value="Page3.html">Page 3</option>
</select>
</form> |
| |
| | #2 (permalink) |
| New Member Join Date: Oct 2003
Posts: 8
![]() | What would I change to make each Page open in it's own browser window. Example click on Page 1 and it open's it's own window, then click on Page 2 and then it will open up a different window? Thanks for your help!
__________________ Treat others as you would wish them to treat you. |
| |
| | THREAD STARTER #3 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | This should work for what you're wanting to do. <form name=form1> <select name=jump onchange=window.open(document.form1.jump.options[document.form1.jump.selectedIndex].value)> <option value="page1.html">page 1</option> <option value="page2.html">page 2</option> <option value="page3.html">page 3</option> </select> </form> |
| |