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

Help... I want to use a drop down menu to change links within frame

Status
Not open for further replies.

MarkeyMark

Programmer
Nov 9, 1999
5
0
0
IE
Help PLEASE...&nbsp;&nbsp;I want to use a drop menu/list to use for links... I have some code below to do this... but I want it to change the contents of another frame (main)...&nbsp;&nbsp;how do I do this....<br><br>&lt;HTML&gt;<br>&lt;HEAD&gt;<br>&lt;TITLE&gt;Document Title&lt;/TITLE&gt;<br>&lt;/HEAD&gt;<br><br>&lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt;<br><br>&lt;!--<br>function menu(list) <br>{ <br>location.href = list.options[list.selectedIndex].value<br>}<br>// --&gt;<br><br>&lt;/SCRIPT&gt;<br><br><br>&lt;form name=&quot;jump&quot;&gt;<br>&lt;font face=&quot;Arial, Helvetica, sans-serif&quot; size=&quot;-1&quot;&gt;<br>&lt;select name=&quot;menu&quot; onChange=&quot;location=document.jump.menu.options[document.jump.menu.selectedIndex].value;&quot; value=&quot;GO&quot;&gt;<br>&lt;option value=&quot;Select a phone&quot; selected&gt;Select a phone&lt;/option&gt;<br>&lt;option value=&quot;<A HREF=" TARGET="_new"> value=&quot;<A HREF=" TARGET="_new"> <br>&lt;/form&gt;<br>&lt;/html&gt;<br><br>I am using Frontpage2000 to set up frames and using an index.html to set the frames banner/navi/main... the code above is for 'navi' and I want to link to site in the frame 'main'...<br><br>Pleae help if poss<br><br>Thanks Mark<br><br><br><br><br><br><br><br><br>
 
<FONT FACE=monospace><br>function menu(list) <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;location.href = top.framename.list.options[list.selectedIndex].value<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br></font><br>Notice, I change <FONT FACE=monospace>location.href = list.options[list.selectedIndex].value</font><br><br>All your frames should have a name.<br><FONT FACE=monospace>&lt;frame id=&quot;framename&quot;&gt;</font><br><br> <p>REH<br><a href=mailto:hawkdogg@crosswinds.net>hawkdogg@crosswinds.net</a><br><a href= by Linux</a><br>Learn Linux and Leave out the Windows :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top