Alpha Video Training
Results 1 to 5 of 5

Thread: Can you set initial focus on login component?

  1. #1
    Member -Jinx-'s Avatar
    Real Name
    Jinx
    Join Date
    Jul 2012
    Location
    Wisconsin
    Posts
    963

    Default Can you set initial focus on login component?

    Kind of a silly little thing but I guess it saves a mouse click and prevents the users from whining about it. How can I set the initial focus to the username field on the login component so a user doesn't have to click in the field or tab around to enter their id?

  2. #2
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default Re: Can you set initial focus on login component?

    The great part about the messageboard is the list of similar threads at the bottom of the page when you look at a post.

    Now if we could get the search mechanism to work just like that....

    Found this post... from Steve Workings..

    http://msgboard.alphasoftware.com/al...l=1#post570754
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    Member -Jinx-'s Avatar
    Real Name
    Jinx
    Join Date
    Jul 2012
    Location
    Wisconsin
    Posts
    963

    Default Re: Can you set initial focus on login component?

    Usually I search a lot first but I got lazy....sorry.

    Anyway, I assume that the poster in the other thread meant to put the code into the a5w page that houses the component? I can't seem to get it to work.

    Code:
    <!-- code to set the default input focus -->
    <script>
      document.getElementById('Userid').focus();
    </script>
    I checked and 'Userid' seems to be my element id as well.

  4. #4
    Member -Jinx-'s Avatar
    Real Name
    Jinx
    Join Date
    Jul 2012
    Location
    Wisconsin
    Posts
    963

    Default Re: Can you set initial focus on login component?

    Nevermind, CTRL+F5 took care of it.

  5. #5
    Member StephenP's Avatar
    Real Name
    Stephen Pilon
    Join Date
    Apr 2000
    Location
    Front Royal, Virginia
    Posts
    491

    Default Re: Can you set initial focus on login component?

    I added another part to that to cover when they go to the lost password screen:

    Code:
    <!-- code to set the default input focus -->
    <script>
    <!--
         if (typeof(document.login.Userid) != 'undefined') {     <!-- if 'Userid' exists, focus here (this covers both login and change password) -->
              document.login.Userid.focus()
         } else if (typeof(document.login.VerifyEmail) != 'undefined') {     <!-- if 'VerifyEmail' exists, focus here (this covers recover password) -->
              document.login.VerifyEmail.focus()
         }
    -->
    </script>
    Stephen Pilon
    Associate Librarian
    Christendom College

Similar Threads

  1. Can the Login component be set wit a Default
    By Turnbullca in forum Application Server Version 11 - Web/Browser Applications
    Replies: 6
    Last Post: 10-30-2012, 03:24 PM
  2. Set Focus To Login Component
    By iRadiate in forum Application Server Version 10 - Web/Browser Applications
    Replies: 5
    Last Post: 02-14-2012, 06:32 AM
  3. Tabbed UI: Making the Home tab the initial focus after auto-launching multiple tabs.
    By dionmccormick in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 12-28-2011, 04:35 PM
  4. xdialog initial focus fails after printing
    By Finian Lennon in forum Alpha Five Version 8
    Replies: 0
    Last Post: 09-19-2007, 11:26 AM
  5. code editor initial focus
    By Bill Parker in forum Alpha Five Version 7
    Replies: 5
    Last Post: 10-15-2005, 12:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •