[CLOSED] TextField DirectEvents Keypress question

  1. #1

    [CLOSED] TextField DirectEvents Keypress question

    I recently updated a VS 2005 project to 2013 with Ext v3 and am having an issue with a TextField DirectEvent KeyPress event.

    The old code is:

    <ext:TextField ID="SearchStringField" runat="server" EnableKeyEvents="true">
      <DirectEvents>                
        <KeyPress Before="var e = params[1]; var isEnter = e.getKey() == e.ENTER; if(isEnter){e.preventDefault();} return isEnter;"
                      OnEvent="SearchString">
          <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{gpFindStudent}" />
        </KeyPress>
      </DirectEvents>
    </ext:TextField>
    Now I get the error: 0x800a1391 - JavaScript runtime error: 'params' is undefined and the focus leaves the box after each keystroke.
    Last edited by Daniil; Mar 31, 2015 at 3:57 PM. Reason: [CLOSED]
  2. #2
    Hi @jmilton,

    Please use extraParams instead of params.

    We recommend to use JavaScript debugging to resolve such issues within minutes or even seconds.

Similar Threads

  1. Replies: 4
    Last Post: Jul 03, 2012, 6:43 PM
  2. [CLOSED] TextField KeyPress handler for the Backspace key
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Mar 15, 2012, 1:01 PM
  3. [CLOSED] CalendarPanel: Some question about my customized the <DirectEvents>
    By csssi_coolite in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 13, 2011, 10:53 AM
  4. textfield keypress listeners
    By okutbay in forum 1.x Help
    Replies: 3
    Last Post: May 04, 2010, 2:39 AM
  5. [CLOSED] Add mask to textfield keypress
    By vali1993 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 26, 2010, 4:46 PM

Tags for this Thread

Posting Permissions