Using the Location object to change another frame's URL : Option Select ComboBox : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » Option Select ComboBox »

 

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.navioo.com"
<input type=text size=20 maxlength=100 name="PathnameField" value="/"
<input type=button name="Go" value="Go" onClick="gotoPage()">
</pre>
</form>
</body>
</html>
           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» Option Select ComboBox