NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Simple JavaScript pull down quick menu

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.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 12-01-2002, 11:48 PM THREAD STARTER               #1 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



Simple JavaScript pull down quick menu


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>
deadserious is offline  
Old 02-02-2004, 05:43 PM   #2 (permalink)
New Member
Join Date: Oct 2003
Posts: 8
courtney. is an unknown quantity at this point
 



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.
courtney. is offline  
Old 02-04-2004, 12:49 AM THREAD STARTER               #3 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



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>


deadserious is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 08:50 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger