Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

HTML Drop Down Box

I am using a Drop-Down Box to navagate users on my web site.  This code bellow works great but i would like the link to open in a different frame (main) not default frame.  

Is there something I can add to this code to enable the link to open in the "main" frame?
<input type="button" onclick="location = ''+document.ex2.xfer.options[document.ex2.xfer.selectedIndex].value;" value="Go" />


Here is all the code
-----------------------------------
<base target="main">
<form name="ex2" method="POST">
<div align="center">
<select name="xfer" size="1">
<option value="cp/Scripts/ASP/chat/default.asp" target="main">Chat</option>
<option value="index-2.html">Message Board</option>
<option value="photoalbum/index.htm">Photo Album</option>
<option value="video/index.html">Video</option>
</select>
<input type="button" onclick="location = ''+document.ex2.xfer.options[document.ex2.xfer.selectedIndex].value;" value="Go" />
</div></form>
0
cgriffith4
Asked:
cgriffith4
1 Solution
 
DiuQiLCommented:
http://www.pageresource.com/jscript/jframe2.htm

ie try:
<input type="button" onclick="parent.main.location = ''+document.ex2.xfer.options[document.ex2.xfer.selectedIndex].value;" value="Go" />

Andrew
0
 
cgriffith4Author Commented:
AWESOME Thanks!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now