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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Onchange event handler to open the link outside the frames?

Status
Not open for further replies.

stax

Technical User
Sep 25, 2002
81
US
Hi,

I'm trying I cant get my drop down menu selectable list of URL links to open into the selected URL into the outer most frame (the main html page) and not in the frame or table that it sits within, My HTML code is below..

<FORM NAME="nav">
<SELECT NAME="SelectURL" style="width:11.38em" align="left" onChange="document.location.href=document.nav.SelectURL.options[document.nav.SelectURL.selectedIndex].value">
<OPTION VALUE=" menu option
</SELECT>
</FORM>

I was told that to do so i need to write in java as "You would need to change your onchange event handler to open the link outside the frames. The onchange handler calls javascript"

Can anyone suggest how i would do this? and would i put the java script directly before my HTML code above? Any help would be apprieciated!
S
 
Hi

Code:
<form name="nav">
<select name="SelectURL" style="width:11.38em" align="left" onchange="[red]top[/red].location.href=document.nav.SelectURL.options[document.nav.SelectURL.selectedIndex].value">
<option value="[URL unfurl="true"]http://www.mylinkhere.com">the[/URL] menu option</option>
</select>
</form>

Feherke.
 
Thanks Feherke! I really appreciate it!
S
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top