I have a login page for my web database system.
How can i make it so the "User" Input text box
is the highlighted field and when the page loads
the user can start typing his/her id in first?
help please
Tom.
Printable View
I have a login page for my web database system.
How can i make it so the "User" Input text box
is the highlighted field and when the page loads
the user can start typing his/her id in first?
help please
Tom.
Hope this helps:
This is the form (frmMain) and the text-box (txtLogin):
<form name="frmMain" method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv"
s-format="TEXT/CSV" s-label-fields="TRUE" --><p>
<input type="text" name="txtLogin" size="20"><input type="submit"
value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
This is a little script to set the focus:
<script language="JAVASCRIPT">
SetFocus()
function SetFocus()
{
document.all.frmMain.txtLogin.focus();
}
</script>
Note: the script has to be located at the end of the html-code, because the
text-box is not loaded at the beginning of the file.
BigMomma
"BigMomma" <FakeMail@FakeDomain.com> wrote:
>Hope this helps:
>
>This is the form (frmMain) and the text-box (txtLogin):
>
><form name="frmMain" method="POST" action="--WEBBOT-SELF--">
> <!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv"
>s-format="TEXT/CSV" s-label-fields="TRUE" --><p>
> <input type="text" name="txtLogin" size="20"><input type="submit"
>value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
></form>
>
>
>This is a little script to set the focus:
>
><script language="JAVASCRIPT">
> SetFocus()
>
> function SetFocus()
> {
> document.all.frmMain.txtLogin.focus();
> }
></script>
>
>
>Note: the script has to be located at the end of the html-code, because
the
>text-box is not loaded at the beginning of the file.
>
>BigMomma
>
>
Worked a treat, Thanks!
Tom