[CLOSED] Question about one of the samples

  1. #1

    [CLOSED] Question about one of the samples

    Based on the login sample:

    https://examples1.ext.net/#/Layout/FormLayout/Login/

    What modifications are required it in order that when the user is in the password field and he hit the <Enter> key proceed with the login? Like it happens with a traditional html form whith a submit button.


    Thank you in advance.
    Last edited by Daniil; Mar 02, 2011 at 3:17 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I can suggest you to use the following KeyMap:

    Example
    <ext:KeyMap runat="server" Target="={Ext.isGecko ? Ext.getDoc() : Ext.getBody()}">
        <ext:KeyBinding>
            <Keys>
                <ext:Key Code="ENTER" />
            </Keys>
            <Listeners>
                <Event Handler="btnLogin.fireEvent('click');" />
            </Listeners>
        </ext:KeyBinding>
    </ext:KeyMap>
    The alternative way is handling SpecialKey event of TextField.
  3. #3
    Hi,

    One option would be to capture the <KeyPress> Listener. Please be sure to set EnableKeyEvents="true" on the TextField as well.

    Hope this helps.
    Geoffrey McGill
    Founder
  4. #4
    Thank you, the KeyMap was what I was looking for, it solves the problem.

    Please, mark the thread as Solved.

Similar Threads

  1. Looking for samples....
    By jay1_z in forum 2.x Help
    Replies: 2
    Last Post: Jul 31, 2012, 8:07 PM
  2. [CLOSED] Combination Samples v2.0 Issues
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Jul 18, 2012, 6:40 PM
  3. [FIXED] [2.0] Treeview on Samples V2
    By equiman in forum Bugs
    Replies: 4
    Last Post: Jul 04, 2012, 11:05 AM
  4. MVC Samples Source
    By t316 in forum 1.x Help
    Replies: 1
    Last Post: Jul 19, 2011, 12:13 PM
  5. Replies: 1
    Last Post: Jun 02, 2009, 8:24 AM

Posting Permissions