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

jump menu and multiple target frames

Status
Not open for further replies.

Tee1212

Vendor
Mar 26, 2001
82
US
I have a jump menu that currently fills the main window with a page. That works fine. But what I'd really like to do is send multiple pages into multiple frames when one of the menu items is selected (i.e. When Page 1 is selected it sends Page1a.html to frame a; Page 1b.html to frame b, etc.). Does anyone know how I can do this? Here is what I have so far...

<form name=&quot;form2&quot; method=&quot;post&quot; action=&quot;&quot;>
<div align=&quot;left&quot;>
<select name=&quot;select&quot; class=&quot;pmtext1&quot; onChange=&quot;MM_jumpMenu('parent',this,0)&quot;>
<option value=&quot;page1.html&quot; selected>Page 1</option>
<option value=&quot;page2.html&quot;>Page 2</option>
</select>
</div>
</form>
 
<form name=&quot;form2&quot; method=&quot;post&quot; action=&quot;&quot;>
<div align=&quot;left&quot;>
<select name=&quot;select&quot; class=&quot;pmtext1&quot; onChange=&quot;MM_jumpMenu('parent',this,0);setPage(this.selectedIndex)&quot;>
<option value=&quot;page1.html&quot; selected>Page 1</option>
<option value=&quot;page2.html&quot;>Page 2</option>
</select>
</div>
</form>
<Script type=&quot;text/javascript&quot; language=&quot;javascript&quot;>
function setPage(index)
{
DestinationFrame=&quot;Fill in here the name of the destination frame&quot;;
switch(index)
case 0 : parent.document.frames[DestinationFrame].location.href=&quot;APageYouHave1.html&quot;;break;
case 1 : parent.document.frames[DestinationFrame].location.href=&quot;APageYouHave2.html&quot;;break;
}
</Script>
 
Sorry made one error(forgot some braces
Replace the function by this:
function setPage(index)
{
DestinationFrame=&quot;Fill in here the name of the destination frame&quot;;
switch(index)
{
case 0 : parent.document.frames[DestinationFrame].location.href=&quot;APageYouHave1.html&quot;;break;
case 1 : parent.document.frames[DestinationFrame].location.href=&quot;APageYouHave2.html&quot;;break;
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top