Simple JavaScript pull down quick menu

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

deadserious

Established Member
Impact
6
Code:
<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>

B-)
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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!
 
0
Close
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>


:)
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back