You are here: irt.org | FAQ | JavaScript | Frame | Q3 [ previous next ]
If your initial file contains:
<html>
<frameset rows="50%,50%">
<frame src="frame1.html" name="frameName1">
<frame src="frame2.html" name="frameName2">
</frameset>
</html>In frame1.html place the following contents:
<html>
<script language="JavaScript"><!--
function functionName() {
parent.frameName2.location.href =
window.document.formName.textName.value;
return false;
}
//--></script>
<form name="formName" onSubmit="return functionName()">
URL: <input type="text" name="textName" value="">
<input type="submit" value="Go" onClick="return functionName()">
</form>
</html>In frame2.html, just to ensure you don't get any errors place the following:
<html> <body> </body> </html>