1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    13
    Vote Rating
    1
    manishnp is on a distinguished road

      0  

    Default Unanswered: Extjs Button Clicked Multiple Times

    Unanswered: Extjs Button Clicked Multiple Times


    Hi ,
    I found one solution for the problem which I am facing , but it was for Sencha Touch.You can follow the link

    http://stackoverflow.com/questions/1...h-a-view-twice

    What I need now how I can prevent a button which if gets clicked multiple times executes the code and then there is a mess.

    On my button click I am loading a View and Showing it to a Center Region panel.When I click the Button multiple times(i.e keep on clicking the button ) it just make the screen blank.

    I want to prevent this multiple clicks.


    Thanks
    Manish Pandit



  2. #2
    Sencha Premium Member
    Join Date
    Feb 2010
    Location
    Chicago
    Posts
    34
    Answers
    10
    Vote Rating
    8
    Johnny Major will become famous soon enough

      0  

    Default


    When the button is clicked you could first mask the screen then proceed.

  3. #3
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    I think I'd disable (or mask) the button add a listener to the store's load event to enable (unmask) it.

    Code:
    handler: function (btn) {
        var store = view.getStore();
    
    
        store.on({
            load: function () {
                btn.enable();
            },
            single: true
        });
    
    
        btn.disable();
        store.load();
    }
    If the view's store and this load button are stable fixtures you could even just add a beforeload and load listener to the store to disable / mask the button and then enable it on load and the button handler would just have the view.getStore().load() action.
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

    C
    heck out all of the 2013 SenchaCon presentations here:
    http://www.sencha.com/blog/senchacon...now-available/

Thread Participants: 2

Tags for this Thread

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