Although the script works, I get this error
"textInput.Input is null or not an object."
Please help me. what am I doing wrong?
//input.htm
<html>
<title><title>
<head>
<script language="Javascript" type="text/javascript">
<!--
window.onload=DoThis;
function DoThis()
{
document.searchInput.search.focus();
if (searchInput.search.length != '0')
{
textInput.INPUT.focus();
}}
//-->
</script>
</head>
<body>
<FORM name="searchInput" action="input.htm" method="post" >
<INPUT maxLength=30 name="search">
<INPUT type="submit" value="search now" >
</FORM>
<form name="textInput" action="input.htm" method="post" >
<input type="text" maxlength="4" name="INPUT">
<input type="submit" value="Input">
</form
</body>
<html>
</code>
"textInput.Input is null or not an object."
Please help me. what am I doing wrong?
//input.htm
<html>
<title><title>
<head>
<script language="Javascript" type="text/javascript">
<!--
window.onload=DoThis;
function DoThis()
{
document.searchInput.search.focus();
if (searchInput.search.length != '0')
{
textInput.INPUT.focus();
}}
//-->
</script>
</head>
<body>
<FORM name="searchInput" action="input.htm" method="post" >
<INPUT maxLength=30 name="search">
<INPUT type="submit" value="search now" >
</FORM>
<form name="textInput" action="input.htm" method="post" >
<input type="text" maxlength="4" name="INPUT">
<input type="submit" value="Input">
</form
</body>
<html>
</code>