Hybrid View

  1. #1
    Ext JS Premium Member
    Join Date
    Jul 2010
    Location
    UK
    Posts
    524
    Vote Rating
    29
    MrSparks has a spectacular aura about MrSparks has a spectacular aura about

      0  

    Question [B1] fireEvent "click" when the enter key is pressed

    [B1] fireEvent "click" when the enter key is pressed


    Hi,

    Would would be the EXTJS 4 equivalent of the following?

    Code:
    keys: [{ key: [10, 13], fn: function() {
    	var sbt001 = Ext.getCmp('mybutton'); 
    	sbt001.focus();
    	sbt001.fireEvent("click", sbt001);
    	}
    }]
    Many Thanks
    MrSparks

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    79
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    First, stop using Ext.getCmp.

    Second, why not just stb001.handler.call(stb001.scope, stb001);

  3. #3
    Ext JS Premium Member
    Join Date
    Jul 2010
    Location
    UK
    Posts
    524
    Vote Rating
    29
    MrSparks has a spectacular aura about MrSparks has a spectacular aura about

      0  

    Default


    Quote Originally Posted by jgarcia@tdg-i.com View Post
    First, stop using Ext.getCmp.

    Second, why not just stb001.handler.call(stb001.scope, stb001);
    I've altered my code to the following but the enter keypress is still being ignored/not trapped. However if I execute the handler call in my FF console, the button is triggered.
    Code:
    keys: [{ key: [10, 13], fn: function() {
            var sbt001 = Ext.getCmp('mybutton'); // will move away from this method at some point
            //sbt001.focus();
            //sbt001.fireEvent("click", sbt001);
            sbt001.handler.call(sbt001.scope, sbt001);
            }
    }]

Similar Threads

  1. "passing google maps gevents to extjs" or "simulate mouse click"
    By thomas.oberthanner in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 11 Aug 2011, 6:06 AM
  2. When click "Enter" in form panel, the IE browser will refreshed.
    By qgj2046 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 3 Dec 2009, 10:19 PM
  3. Ajax Request - "this.fireEvent is not a function"
    By neall in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 11 Jan 2008, 7:45 AM
  4. Focus on button when "enter" is pressed after writing in a text box
    By ksachdeva in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 5 Jan 2008, 6:05 PM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi