[CLOSED] how to fire enter event when click in the textfield?

  1. #1

    [CLOSED] how to fire enter event when click in the textfield?

    how to fire enter event when click in the textfield?
      <ext:TextField runat="server" ID="tf_prov" FieldLabel="省" LabelWidth="30" EmptyText="请输入省" EnableKeyEvents="True">
                                        <Listeners>
                                            <KeyUp Handler="
                                                  alert(item);
                                                  alert(e);
                                                ">
                                            </KeyUp>
                                        </Listeners>
                                    </ext:TextField>
    Last edited by Daniil; May 30, 2014 at 2:16 PM. Reason: [CLOSED]
  2. #2
    How about the <Focus> Listener?
    Geoffrey McGill
    Founder & CEO
  3. #3
    i think should use keyup event , becuase i want to type something in the textfield , then accord to the typed character to change the treepanel,
    how to capture the event which i press the "enter" key ?
    function ( item, e )
  4. #4
    Hi @hdsoso,

    You can use a SpecialKey event.
    http://docs.sencha.com/extjs/4.2.1/#...ent-specialkey

    Example
    <ext:TextField runat="server">
        <Listeners>
            <SpecialKey Handler="if (e.getKey() === e.ENTER) {
                                     console.log('ENTER');
                                 }" />
        </Listeners>
    </ext:TextField>

Similar Threads

  1. Replies: 0
    Last Post: Jun 09, 2013, 6:26 AM
  2. Replies: 1
    Last Post: Mar 21, 2012, 8:47 PM
  3. Button Click Fire event parameters
    By garag in forum 1.x Help
    Replies: 2
    Last Post: Sep 21, 2011, 10:35 AM
  4. Fire click event on a combobox
    By mojo in forum 1.x Help
    Replies: 1
    Last Post: Dec 13, 2010, 4:25 PM
  5. Replies: 1
    Last Post: Jan 27, 2010, 12:21 PM

Posting Permissions