Front of the queue when the page loads


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Front of the queue when the page loads

  1. #1
    Tom Guest

    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.

  2. #2
    BigMomma Guest

    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



  3. #3
    Tom Guest

    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center