Using the Location object to change another frame's URL
<html> <head> <title>Footnotes Frame in Location Object Example</title> <SCRIPT LANGUAGE="JavaScript"> <!-- function gotoPage() { window.location.href = window.document.loc.ProtocolField. options[window.document.loc.ProtocolField.selectedIndex].text + document.loc.HostnameField.value + document.loc.PathnameField.value } //--> </SCRIPT> </head> <body> <p><font size=5>protocol//hostname:port pathname</font></p> <form name="loc" method="POST"> <pre>Protocol: Hostname: Pathname: <select name="ProtocolField" size=1> <option>http://</option> <option>file://</option> <option>javascript:</option> <option>ftp://</option> <option>mailto:</option> </select> <input type=text size=23 maxlength=256 name="HostnameField" value="www.java2s.com"> <input type=text size=20 maxlength=100 name="PathnameField" value="/"> <input type=button name="Go" value="Go" onClick="gotoPage()"> </pre> </form> </body> </html>