/*
JavaScript Unleashed, Third Edition
by Richard Wagner and R. Allen Wyke
ISBN: 067231763X
Publisher Sams CopyRight 2000
*/
<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>
<option>gopher:</option>
<option>about:</option>
</select> <input
type=text
size=23
maxlength=256
name="HostnameField"
value="www.typehere.com"> <input
type=text
size=20
maxlength=100
name="PathnameField"
value="/"> <input
type=button
name="Go"
value="Go"
onClick="gotoPage()"></pre>
</form>
</body>
</html>
|