Entry
Needed: a javascript single line blank input form that opens any url thats entered in it on submit.
May 10th, 2003 04:39
Jean-Bernard Valentaten, Rick Dome,
All you need is an input-line and a submit button:
<html>
<head>
<script language="JavaScript">
<!--
function openUrl()
{
var myUrl = document.forms['myForm'].elements['myInput'].value();
if (myUrl.lenght > 0)
document.location.href = myUrl;
}
//-->
</script>
</head>
<body>
<form id="myForm" action="." method="get" onSubmit="openUrl();">
<input id="myInput" type="text" size="30">
<input id="myButton" type="submit">
</form>
</body>
</html>
That should work and I'm sure you won't have any problems integrating
it into your page :)
HTH,
Jean