Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pull Down Menu Items to Open in New Window

Status
Not open for further replies.

daczac

Technical User
Mar 19, 2008
3
CA
I have the following code for a pull down menu in my html. I added target="_blank" in the action as I want the contents of my selection to appear in a new window not the same window. Unfortunatly adding this doesn't work. Could you tell me what script I need to add? Thank-you

<form action=" method="post" target="_blank" name="nav2">
<div><select onChange=
"document.location.href=
document.nav2.url.options[document.nav2.url.selectedIndex].value" name="url">
<option value=" selected="selected">Please select a Stellarton By-Law:</option>
<option value="pdfs/bicycles.pdf">Bicycles</option>
<option value="pdfs/circuses.pdf">Circus</option>
<option value="pdfs/dogs.pdf">Dogs</option>
</select></div>
</form>
 
do you really want your navigation to be based on javascript? what if someone browses your site with javascript disabled?

regardless, you'll need to change your onchange event. for suggestions i'd recommend taking this to the javascript forum (
----
star.gif
 
Thanks for the advice. I'm not stuck on javascript. Could you suggest another way of setting up a pull-down menu without javascript that will open up a new window when one of the items in the menu is selected? Thank-you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top