Forum Moderators: open
I have a page with a drop down form where you select from the list and that page opens in the browser. Now I want to move that drop down form into a frame at the top and have the page selected in the form open in a frame at the bottom.
I've created the frame.html page, a top.html page, and a main.html page. The frame.html page contains this which works fine:
FRAMESET ROWS="140,*" BORDER="0">
FRAME NAME="top" SRC="top.html">
FRAME NAME="main" SRC="main.html">
Within top.html is this in the head:
Script Language="javascript" Type = "text/javascript">
function jumpBox(list) { location.href = list.options[list.selectedIndex].value}
/Script>
and this in the body:
FORM Action="">
SELECT Name="">
OPTION Value="1.html"> 1
OPTION Value="2.html"> 2
/SELECT>
INPUT TYPE="button" VALUE="Go" onClick="jumpBox(this.form.elements[0])">
/FORM>
So, my question is: How can I make 1.html or 2.html open in the "main" frame? I've tried to add Target=main to these places:
OPTION Value="1.html TARGET=main">
OPTION Value="1.html" TARGET=main>
onClick="jumpBox(this.form.elements[0]) TARGET=main">
onClick="jumpBox(this.form.elements[0])" TARGET=main>
but those don't work.
As you can tell I'm not a javascript developer and am trying to hack my way through this. Any help is appreciated.