-
Front of the queue when the page loads
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.
-
Re: Front of the queue when the page loads
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
-
Re: Front of the queue when the page loads
"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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks