Javascript help

B

Brett

Hello,
I've got a simple text list, to where when I selected a value and click the
button a new windows pops up with the desired imaged gif file.
I need it to load in the "Main" frame of a frameset.
My frame has a simple, Top, Side and Main frames. The JScript in located
in the "side" frame.

any help would be appreciated.
I looked up the options for the window.open event.. there is nothing
describing where you want the page to open up to...



<form>
<a target="Main" href="page1.htm">
<select id="Choice" style="color: #0000FF" size="1" name="mySelect">
<option value="">Select one</option>
<option value="jan/1.htm">Image1</option>
<option value="jan/2.htm">Image2</option>
<option value="jan/3.htm">Image3</option>
</select></a>

<input type="button" value="Go"
onclick="window.open(Choice.options[Choice.selectedIndex].value)">
</form >
 
J

Jon Spivey

Hi,
Like this
<form>
<a target="Main" href="page1.htm">
<select name="Choice">
<option value="">Select one</option>
<option value="jan/1.htm">Image1</option>
<option value="jan/2.htm">Image2</option>
<option value="jan/3.htm">Image3</option>
</select></a>

<input type="button" value="Go"
onclick="if(this.form.Choice.selectedIndex>0)parent.Main.location.href=this.form.Choice.options[this.form.Choice.options.selectedIndex].value;">
</form >

Cheers,
Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top