Onload and Tabbing focus problem

I was asked by some of my users to set focus to the username
field on the login page when it loads. I began by adding to the
body tag and cfform tags OnLoad function. This allowed the page to
load and set up the user to just start typing without clicking in
the field. The problem is with trying to tab to the next field. The
only way I can even start tabbing to other fields is to click in
one and then depress the tab key. However, this only tabs over to
the other two fields while leaving out one of the fields.
I would like the page to load so that the user can start
typing and then by pressing tab he can move on to the next field. I
don't know why this code doesn't work. It is kind of frustrating.
Does anybody know of a fix to this problem?
Thank you for your time!

Use a tabindex attribute in your form fields:
http://www.htmlgoodies.com/tutorials/forms/article.php/3479201
Tom Muck
co-author Dreamweaver MX 2004: The Complete Reference
http://www.tom-muck.com/
Cartweaver Development Team
http://www.cartweaver.com
Extending Knowledge Daily
http://www.communitymx.com/
"jedale" <[email protected]> wrote in
message
news:[email protected]...
I was asked by some of my users to set focus to the username
field on the
login
page when it loads. I began by adding to the body tag and
cfform tags
OnLoad
function. This allowed the page to load and set up the user
to just start
typing without clicking in the field. The problem is with
trying to tab to
the
next field. The only way I can even start tabbing to other
fields is to
click
in one and then depress the tab key. However, this only tabs
over to the
other
two fields while leaving out one of the fields.
I would like the page to load so that the user can start
typing and then by
pressing tab he can move on to the next field. I don't know
why this code
doesn't work. It is kind of frustrating. Does anybody know of
a fix to this
problem?
Thank you for your time!
<body onLoad="self.focus();document.login.focus()"
bgcolor="#F2F9FF">
<center>
<cfform format="flash" name="login" action="login.cfm"
method="post"
width="100%" height="100%" preservedata="true"
preloader="yes"
timeout="3600"
wmode="transparent" style="font-size:12px; font-weight:bold;
background-color:##F2F9FF; themeColor:##003366"
onload="name.setFocus();">
<cfformitem type="script">
function Tabit(){
if(Key.getCode() == Key.TAB){
password.setFocus()
</cfformitem>
<cfformgroup type="vbox"
style="horizontalAlign:'center';" id="mainbox">
<cfformgroup type="panel" id="loginPanel"
style="headerHeight:0;panelBorderStyle:'roundCorners';
shadowDistance:1;
background-color:##80A8D5; marginTop:0;" width="320"
height="80">
<cfformitem type="spacer" height="2" />
<cfinput width="200" maxlength="30" type="text"
name="name" label="Name"
style="font:Arial, Helvetica, sans-serif; font-size:12px;
font-weight:normal"
onKeyDown="Tabit();">
<cfinput width="200" maxlength="30" type="password"
name="password"
label="Password" style="font:Arial, Helvetica, sans-serif;
font-size:12px;font-weight:normal" >
</cfformgroup>
<cfformgroup type="vbox">
<cfformgroup type="horizontal"
style="horizontalAlign:'center';">
<cfinput type="button" name="logInButton" value="Log In"
onClick="alert('Submitted form');">
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfform>
</center>
</body>

Similar Messages

  • TitleWindow PopUp Tab/Focus problem

    Hi
    I am wondering if anyone can help me. There is a titleWindow popup created. A login form is loaded into it. With 2 text input fields: Username and Password and one Button, OK.
    The problem I am having is that I cannot get tabbing to work inside the new titleWindow. When I click on the user input field and then press tab, the cursor disappears. I have searched the net and there are numerous instances of this happening, but no actual solution that I can see.
    The Login Component is of type VBox.
    The weird thing is, if I enter the wrong details or no details and click ok. Then The tabbing wors the second time around. It is just when it is initially loaded. I have no idea why this could be?
    Can anyone help as it is driving nuts.
    Thanks

    Here is the MXML for the title windoew to be popped up
    private function popupLogOnDlg(evt:Event=null):void
                                            stwLogOn = new StwLogOn();
                                            stwLogOn.addEventListener("clickOK", handleCloseLogOnDlg);
                                            titleWindow= TitleWindow.show(stwLogOn, "Log On", 0, true, null, handleCloseLogOnDlg);
                                            titleWindow.isResizable=false;
    And here is the MXML for the Login Component
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
                          width="280" height="115" defaultButton = "{okBtn}">
              <mx:Script>
                        <![CDATA[
                                  private function handleClickOK():void
                                            dispatchEvent(new Event("clickOK"))
                        ]]>
              </mx:Script>
              <mx:Form width="100%">
                        <mx:FormItem width="100%" label="User name:" horizontalAlign="right">
                            <mx:TextInput width="100%" restrict="A-Za-z0-9_." id="nameTextInput"/>
                        </mx:FormItem>
                        <mx:FormItem width="100%" label="Password:" horizontalAlign="right">
                            <mx:TextInput width="100%" id="keywordTextInput" displayAsPassword="true"/>
                        </mx:FormItem>
              </mx:Form>
              <mx:HBox horizontalAlign="right" width="100%">
                        <mx:Button label="Log On" id="okBtn" click="handleClickOK()"/>
                        <mx:Spacer width="10"/>
              </mx:HBox>
    </mx:VBox>

  • 10.10.3 caps lock and tab key problems

    Since I upgraded to 10.10.3 I've had no tab key or caps lock. No one else has written about this. Am I the only one having these problems?
    I guess I will take the keyboard home to try with a different Mac.

    Hi venustas,
    It sounds like you updated your computer and now 2 keys do not appear to be working. You should use this section of the following article to troubleshoot that:
    OS X Yosemite: If keys on your keyboard don’t work
    If other keys don’t work
    You may have accidentally set an option that changes how your keyboard operates.
    Choose Apple menu > System Preferences, click Dictation & Speech, then click Text to Speech. If “Speak selected text when the key is pressed” is selected, deselect it or click Change Key to select another key. 
    Choose Apple menu > System Preferences, click Accessibility, then click Keyboard. Make sure Slow Keys is turned off. If Slow Keys is on, you must hold down a key longer than usual before it’s recognized. 
    Choose Apple menu > System Preferences, click Accessibility, then click Mouse & Trackpad. Make sure Mouse Keys is off. If Mouse Keys is on, pressing keys in the numeric keypad moves the pointer instead of entering numbers. 
    Choose Apple menu > System Preferences, click Keyboard, then click Input Sources. Select “Show Input menu in menu bar.” Open the Input menu, then make sure the correct keyboard layout is selected. 
    To see the keyboard layout, click Keyboard, then choose “Show Keyboard & Character Viewers in menu bar.”
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • 3.x WAD TAB Focus problem

    I am desiging a web template(in 3.x) which comprises of other web templates using TABs. I have used the standard javascript for the TABs but the issue is when I run it first time the TABs don't work, all the 3 web templates show. but when I click on one tab then they show up under each TAB. Not sure where I am wrong?
    I wasn't able to paste the code. I will try again.

    Thanks KK, for some reason can't paste the code here. do u know why?
    Basically I have 3 reports to diaplay on one screen. Each report has either a table or chart and its corresponding navigation web item. I thought best way would be to create a Main web template with TABs and then embed 3 web templates which will have the 3 reports. In the main web temp I have the javascript code, the first web template is visible others are hidden, I guess after the inital run the javascript should manage the reports when I click on the TABs. Any ideas if I am doing something wrong?

  • Window and tab safari problems

    I updated Adobe flash player and it automatically updated safari as well without even asking me. Now when I highlight and click on a link there is no longer an "open link in new tab" option. I have gone into the safari preferences and tried to fix it under the tabs section but when I do that links only open in new tabs and not windows when you select the "open link in new window" option. Is there any way to fix this?

    While we all have MacBooks in this forum not all of us use Safari. Many of us use Firefox or Chrome. There's a Safari Support Community where everybody uses Safari. You should also post this question there to increase your chances of getting an answer. https://discussions.apple.com/community/mac_os/safari

  • Problem with new firefox tabs and window focus

    Here's a problem that I've had for ages - sometimes it annoys me, other times I can live with it. Right now it's really p***ing me off.  :x
    I have selected 'a new tab in the most recent window' under FF's Preferences->Tabs->Open links from other applications in:, so as an example, if I click on a URL in a mail in Thunderbird, Firefox opens it in a new tab. However, window focus stays on Thunderbird. I run both of them full screen, so although I'm looking at the web page in Firefox, anything I do on the keyboards affects Thunderbird. It affects URLs opened from other apps too e.g. if I open a terminal and do
    firefox www.archlinux.org
    focus stays on the terminal window. The only exception is when firefox is not already running - in that case, firefox launches with focus.
    DE is xfce4, and the system is completely up to date.
    I've done some googling, and AFAICS, nobody else seems to have this problem. Any ideas, anyone?
    TIA.

    Thanks MAC!EK - definitely a useful add-on, but it still doesn't solve my problem. In Tab Mix Plus Options, I have the following selected:
    Links -> Open links from other applications in: New tab
    Events-> Tab Focus -> Focus/Select tabs  that open from: <all>
    However, the behaviour is as before i.e. I click a URL in Thunderbird, it opens in a new tab in Firefox, but window focus stays on Thunderbird. Within Firefox, the newly-opened tab is selected or focussed, but Firefox itself is not.
    Anyway, thanks again. I think I need to keep looking.

  • IE 10 blank new tab and missing favourites problem only when requiring a proxy for first page visit

    We are having a very strange situation with one (only) of our 64bit 2008r2 remote desktop session host servers.  The problem we are having is that when any new tab or window is opened it must first open a page that is in the
    internet options -> connections ->LAN settings -> Advanced -> Exception. Do not use proxy server for addresses beginning with
    Area.  OR ELSE....
    The entire contents of the favourites menu below "Organize favourites" is missing, though the favourites explorer bar, and tool bar display the links, but they cannot be opened in the current tab and will not create a new tab when you click open
    in new tab.  HOWEVER, this problem is instantly resolved if you manually type into the address bar and visit a site that is in the proxy exception list.  Then that tab starts to function normally, the favourites menu is populated and works, and so
    does the favourites explorer bar, and toolbar, and other websites can be visited.
    This is extremely problematic.  Looking at the proxy server logs, when the problem is happening no attempt is made at contacting the proxy server.
    Ways we've encountered this problem
    If the user has the option set that a new tab opens the 'new tab page' then any new tab experiences the problem.
    If the browser is set to open the user's home page(s) then any of the home pages that are not in the exception list may or may not open successfully. But again any of them that opened a page that was not in the proxy exception list will experience
    the problem
    when a user tries to click on a website link from an email or document that is not in the proxy exception list, as this opens a new window or tab and it is just blank.
    when a website not in the exception list tries to open a new window/tab
    This problem is happening for all users on that RD session host server, including domain admins, except for THE domain/enterprise administrator.  Our other 2008r2 64bit RD session host servers and windows 7 machines with the same version of IE
    installed on it does not have this problem.
    We have tried deleting all IE data, resetting IE, re-registering the ieproxy.dll with the regserv32 command and the problem continues.
    Our proxy settings for each user is coming from the group policy setting of 'computer config -> policies -> Administrative Templates -> Windows Components -> Internet Explorer -> Make proxy settings per-machine = enabled'
    and THE domain administrator choosing to enable the proxy server and disable automatic proxy detection.

    Hi,
    Since you have  tried many methods like deleting all IE data, resetting IE, and it works well on other Windows 7 machines, the problem might be some clients didn’t respond to the group policy.
    Try to update the group policy with this command at the clients ”gpupdate /force”.
    And check whether the client is infected with virus, some virus might cause this issue too.
    Regards
    v-yamliu

  • I just bought a brand new iPhone 5s and a huge problem is that when i try to sync my music to my iPhone 5s, under the music tab it says that i can only access my music via iCloud. is there anyway to sync your music from your computer?????

    I just bought a brand new iPhone 5s and a huge problem is that when i try to sync my music to my iPhone 5s, under the music tab it says that i can only access my music via iCloud. is there anyway to sync your music from your computer?????

    The ! sign before the song means that the actual song is no longer on your computer and/or iTunes library.

  • I have Speedgrade CS6 installed on my Mac and i have problems renaming my layers when I am grading. I was wondering if anybody can tell me how to rename my layers(Under the look tab). If not, is it because thins is not possible in Speedgrade CS6.

    I have Speedgrade CS6 installed on my Mac and i have problems renaming my layers when I am grading. I was wondering if anybody can tell me how to rename my layers(Under the look tab). If not, is it because this is not possible in Speedgrade CS6.

    No you can't. Renaming grading layers is a features since version 7 a.k.a. CC. Time to upgrade?

  • Problem with tabbed focusing

    I have a question that I'm guessing has a ridiculously simple answer for you gurus, but I still can't figure this out:
    For some reason, I've had a couple of instances where the OS will go into a "tab focusing" mode, where hitting the tab will switch to each item and put a blue highlight around it, whether it's in a dialog box or the bookmarks bar in Safari. The highlight doesn't always function as something I can activate with the enter key or arrows, though (as in the Shut Down dialog box). The first instance of this (I believe) went away on its own, after performing an OS update. In either case, I'm pretty sure I haven't accidentally turned on something in the system preferences.
    Anyone have a quick and dirty explanation (or better yet, a fix!) for this?

    Hi Chris
    it may be that you un-wittingly hit Shift-F7 which toggles Tabbing between "text boxes & lists only" and "All controls"
    I know I've done this a few times
    iMac G5 rev B   (OSX 10.4.7)  2GB 250GB

  • Tabbed Pane Focus Problems

    Focus traversal doesn't appear to be working on tabs added after the JFrame is initially displayed (at least on JDK 1.4.2):
    1) Run the program. Focus is on the last field on the 3rd tab. Use the tab key to cycle through all components. It successfully tabs to the button, the tab, and each text field. This is working ok.
    2) Create a new tab.
    a) Focus should be on the last text field, but no component appears to have focus. (why???)
    b) Type some character. They are added to the last text field. So focus was placed on the last text field, but the caret was not painted (why???)
    c) Use the tab key to cycle through the components. When tabbing through the text fields the caret is not painted to indicate focus, except for the last text field (why???)
    d) Click on a text field and use the tab key to cycle through all compnents. This time the caret will be painted for the last text field and the text field you just clicked on. (why???)
    Any suggestions on how to fix this wierd behaviour? Here's my test code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class TabbedPaneFocusTest
         static int columns = 0;
         public static void main(String args[])
              final JTabbedPane tabbedPane = new JTabbedPane();
              newTab(tabbedPane);
              newTab(tabbedPane);
              JComponent component = newTab(tabbedPane);
              JButton button = new JButton("Add Tab");
              button.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        newTab(tabbedPane);
              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              frame.getContentPane().add(tabbedPane);
              frame.getContentPane().add(button, BorderLayout.SOUTH);
              frame.setSize(400, 200);
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
              // Select tab 3 and set focus on the last text field.
              tabbedPane.setSelectedIndex(2);
              component.requestFocusInWindow();
         private static JComponent newTab(JTabbedPane tabbedPane)
              columns++;
              JComponent component = null;
              JPanel panel = new JPanel();
              for (int i = 0; i < columns; i++)
                   component = new JTextField("TextField" + columns + i);
                   panel.add( component );
              tabbedPane.add( panel, "" + columns );
              tabbedPane.setSelectedIndex( tabbedPane.getTabCount() - 1 );
              component.requestFocusInWindow();
              return component;
    }

    I tested the last code in Java 1.5.0 (build 1.5.0-b64) on a Linux platform, and it does not seem to work. To determine who has the focus, I added a slithy modified DefaultKeyboardManager that printed out the focus owner, when I run the modified code, it seems that the focus is placed on the last textfield when the panes are created before displaying the frame, this works ok however when I created a pane using the button, the focus is on the button and not on the text field. Apparantly pressing the button does a requestFocusInWindow() on the button after the actionPerformed is executed, overruling the requestFocusInWindow() (just my humble opinion). The modified test code follows below:
    Marc
    package testfocus;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Main
         static int columns = 0;
         public static void main(String args[])
              FocusManager.setCurrentKeyboardFocusManager(new DefaultKeyboardFocusManager()
                             public void processKeyEvent(Component c,KeyEvent e)
                                  System.out.println("Focus owner: "+c);
                                  super.processKeyEvent(c,e);
              final JTabbedPane tabbedPane = new JTabbedPane();
              newTab(tabbedPane);
              newTab(tabbedPane);
              JComponent component = newTab(tabbedPane);
              JButton button = new JButton("Add Tab");
              button.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        newTab(tabbedPane);
              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              frame.getContentPane().add(tabbedPane);
              frame.getContentPane().add(button, BorderLayout.SOUTH);
              frame.setSize(400, 200);
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
              // Select tab 3 and set focus on the last text field.
              tabbedPane.setSelectedIndex(2);
              component.requestFocusInWindow();
         private static JComponent newTab(JTabbedPane tabbedPane)
              columns++;
              JPanel panel = new JPanel();
              tabbedPane.add( panel, "" + columns );
              tabbedPane.setSelectedIndex( tabbedPane.getTabCount() - 1 );
              for (int i = 0; i < columns; i++)
                   panel.add( new JTextField("TextField" + columns + i, 5) );
              JTextField component = (JTextField)panel.getComponent(columns - 1);
              component.requestFocusInWindow();
              return component;
    }

  • ClearType is on and size of text is medium 125% problem menu bar bookmark bar and tab text is not clere at all

    system is windows 7 ClearType is on and also in display settings medium is chosen for 125% text size all the bars and tab text is very not clear at all

    Little bit of progress:
    When I allow whatever IE7 blocks, the menu works but 75% of
    the background images don't show up until I hover over them. The
    tabbed menu seems to work fine then though.
    Edit: Sorted the images no showing, but the "Stopped ActiveX
    running" etc error menu still pops up...can I stop that happening
    or is it something that is set on each individual's computer?
    Also the white box background around the round buttons show
    up, as if it was jpeg not a GIF, is that solvable?

  • 508 accessibility and keyboard focus

    I'm using Captivate 4 and can't seem to get the keyboard accessibility to work properly. I want to be able to control the tab order and keyboard focus on each slide. For example, if the user keeps pressing tab they will eventually move from the .swf file and begin reading the address and menu bar in the browser window. Does anyone know how to ensure that the keyboard focus is provided only to active elements?

    Hi,
    I noticed your post while searching for the same answer with respect to Captivate 5.  So far, it is the closest I've seen to the problem I'm trying to resolve.  I see that you had no luck here, but was wondering if you found a solution elsewhere.  All help would be appreciated.

  • How do I prevent tab focus from changing when I scroll tabs with the mouse wheel? [SOLVED]

    Whenever I scroll my tabs with the mouse scroll wheel the tab focus changes from the page I'm currently on to the tab being scrolled to. I usually have a large list of tabs open and I depend on being able to scroll tabs without changing page focus to keep myself organized.
    Also, I'd like to disable tab scroll wrapping; Once I've scrolled my tabs to the end I'd like it to stop scrolling, not wrap around to the start of my tabs.
    Is there a way to disable these features and revert to the tab scrolling behaviour of a previous version of Firefox?

    This is not a standard feature and can be caused by an extension.
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]

  • Tab Focus Proble.

    Hi All,
    I am having problem on focusing the subTab.
    My Requirement is based on the LOV value ,that is at header level the some Detail Sub Tab get disabled & the focus should be on Enabled Tab.
    It is working fine for Disabling Tab. But the problem arise when user click on one Enabled Tab and then Changed the LOV value. Then the Tab Get Disabled but focus remain on the disabled tab. I have to click manually on the Enabled tab to get the focus. This focus problem only happen when user click on the Tab, else if LOV value change and user doesnt click on Tab Disabling and Focus is right.... CAN YOU PLEASE HELP!!!! WHY THIS DOUBLE STANDARD BEHAVIOUR HAPPENING??????????????????
    OASubTabLayoutBean OASubTabLayoutBeanVar =
    (OASubTabLayoutBean)webBean.findChildRecursive("SubTabRN");
    if(headerLovFieldValue.equals("XYZ")
    OASubTabLayoutBeanVar.setSelectedIndex(pageContext,
    "Tab1");
    }else
    OASubTabLayoutBeanVar.setSelectedIndex(pageContext,
    "Tab2");
    }

    This is a bug in ADF Framework. Filed a bug with ADF Framework and they have accepted this as a bug.
    I'll update this post once I get the resolution from ADF team.

Maybe you are looking for

  • Displaying Large Images and Out of Memory Error

    hi, I am relatively new to JAVA and I have been trying to display a large jpeg in a scrollpane. The image is about 30 mb in size and is very long. When compressed the image is very small (1mb) but when uncompressed it increases in size due to the bla

  • Function module to find/check saplogin password

    Hi, can any one tell me the function module to find/check  saplogin password. thanks

  • Could not clone to another monitor

    Hi,everyone: I am writing a project,I want to show the film on two or more monitors,but i find the project only could show on one monitor and could not clone to another monitor,firstly I suspect some issue with graphics driver,but I download a projec

  • Corrupted files in downloading Oracle9 for Solaris

    Hi all, I've experienced in the last three days some problems in downloading Oracle 9.2 for Sun Solaris 8 SPARC/64. I get all the times the three files corrupted (bad crc when I unzip them). These are the lengths of files I've downloaded (I've tryed

  • Unable to load mp3 files recorded using Logic Express into iMovie 8

    I'm having issues getting mp3 files created with Logic Express to load into iMovie... Now when you export audio files from Logic it's usually an AIFF file...so when I play the file in iTunes...I choose the option to "create mp3 version" Now when iTun