Selecting different frames as the target in a drop down box?

windows

Guest
Here is my current code which loads up a webpage into iframe1 based on whatever option is selected from a drop-down box:- <br />
<br />
<select name="select" class="select" onChange="MM_jumpMenu('iframe1',this,0)"> <br />
<option value="news.htm">News</option> <br />
<option value="updates.htm">Updates</option> <br />
<option value="forum.htm">Forum</option> <br />
<option value="contact.htm">Contact</option> <br />
</select> <br />
<br />
How do i have different targets for each option? For example I want some options to load in the parent frame and some to load in iframe1.<!--content-->please post the rest of your code and we may be able to help you.<!--content-->The only other code on the page relating to the drop down box is the java script at the top of the code for when an option is selected.<br />
<br />
<script language="JavaScript" type="text/JavaScript"><br />
<!--<br />
function MM_jumpMenu(targ,selObj,restore){ //v3.0<br />
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");<br />
if (restore) selObj.selectedIndex=0;<br />
}<br />
//--><br />
</script><br />
<br />
I thought all the code i'd need would be contained in the <select> tag? For the life of me I can't figure this out.<!--content-->OK, got it sorted. I did the following...<br />
<br />
<select name="select" class="select" onChange="MM_jumpMenu(this[this.selectedIndex].frameload,this,0)"> <br />
<option value="news.htm" frameload="iframe1">News</option> <br />
<option value="updates.htm" frameload="iframe1">Updates</option> <br />
<option value="forum.htm" frameload="iframe2">Forum</option> <br />
<option value="contact.htm" frameload="iframe2">Contact</option><br />
</select><!--content-->
 
Back
Top