|
Q33 How do I get a value from a dropdown menu, and use it to change the location of another frame?
irt.org | Knowledge Base | JavaScript | Form 10.3 | Q33 [ previous next ]
Q33 How do I get a value from a dropdown menu, and use it to change the location of another frame?
When the following frameset definition has been used:
<frameset rows="20%,*">
<frame src="frameA.html" name="frameA">
<frame src="frameB.html" name="frameB">
</frameset>
|
Use the following type of drop down menu in frameA:
<form name="drop">
<select name="down">
<option value="http://www.yahoo.com">Yahoo
<option value="http://www.netscape.com">Netscape
<option value="http://www.microsoft.com">Microsoft
</select>
<input name="submitName" type="button" value="Go"
onClick="top.frameB.location.href = this.form.drop.down.options[this.form.drop.down.selectedIndex].value;return false">
</form>
|
or:
<form name="drop">
<select name="down">
<option value="http://www.yahoo.com">Yahoo
<option value="http://www.netscape.com">Netscape
<option value="http://www.microsoft.com">Microsoft
</select>
<input name="submitName" type="button" value="Go"
onClick="parent.frameB.location.href = this.form.drop.down.options[this.form.drop.down.selectedIndex].value;return false">
</form>
|
Feedback on 'Q33 How do I get a value from a dropdown menu, and use it to change the location of another frame?'
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.