Change frame location(URL) : frameset « HTML Tags « JavaScript Tutorial






<head>
<script language="JavaScript" type = "text/javascript">
<!--
function changeLocation()
{
    parent.frames[1].location = document.form1.NewURL.value;
}
//-->
</script>
</head>
<body>
<title>Specify URL</title>
</head>
<body>
<form name="form1">
   <input type="text" name="NewURL" size="50">
   <input type="button" value="Change URL" name="URLButton" onClick = "changeLocation()"></p>
</form>
</body>








21.8.frameset
21.8.1.Output a frameset through document.write
21.8.2.Change frame location(URL)
21.8.3.Reference the top frame
21.8.4.Reference the parent frame
21.8.5.Nested framesets
21.8.6.Change two frames in a frame set
21.8.7.Reference element in frameset