[CLOSED] Button event firing twice?

  1. #1

    [CLOSED] Button event firing twice?

    Hi Guys,

    I have a simple one for you. It's a simple Msg box, that has an OK button. Once the user presses the OK button, that triggers the "fn" (function), which does a "notification" with some extra information.

    The thing is...when I hit OK on the Msg box, the function gets fired twice, so I get TWO notification boxes.

    ideas?

    thanks,
    Dan

    Ext.Msg.show({
    title : 'Project Added to Map',
    msg : 'Your project has successfully been added to the map!',
    width : 300,
    buttons : Ext.MessageBox.OK,
    fn:function(btn, text) {
    Ext.net.Notification.show({
    iconCls : 'icon-information',
    //pinEvent : 'click',
    //icon : Ext.Notification.INFO,
    html : "People can also search for your project through the Climate 1-Stop!",
    title : 'Project Entry Also Added',
    hideDelay:7000
    });
    // Ext.Msg.notify("Project Entry Also Added", "People can also search for your project through the Climate 1-Stop!");
    
    },
    icon : Ext.MessageBox.INFO
    })
    Last edited by Daniil; Aug 18, 2010 at 3:45 PM. Reason: Please use [code] tags
  2. #2
    Hello!

    The function gets fired once. I checked it out using the debug mode.
    I think your code works fine.
    The one notification box is appeared after executing this line:
    Ext.net.Notification.show()
    Another notification box is appeared after executing this line:
    Ext.Msg.notify()
    Or don't I understand you properly?
  3. #3

    Well, not for me

    That's very strange...because when I debug the javascript, it does hit the fn:function twice...and TWO identical "notifications" are displayed.

    I guess I'll have to put bool variable hack/check...?
  4. #4
    Hi,

    I think you have to update from SVN, we fixed the same bug recently
  5. #5

    will try it

    I have a simple bool check right now, but will update from the SVN and verify if it works.
  6. #6

    updating from SVN breaks my site

    After doing the update from SVN...my site's ajax methods don't work, so I'm reverting until it's more stable.
  7. #7

    ok, latest svn update worked (august 18th)

    In working with Vlad on this issue, he found a bug with the DirectMethod, ...which wasn't related...but the original problem of the event firing twice, is now also solved. The latest SVN update solves everything.

    thanks!

Similar Threads

  1. Replies: 3
    Last Post: May 15, 2012, 8:48 AM
  2. [CLOSED] BeforeClientInit event not firing
    By jchau in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Apr 04, 2011, 7:07 PM
  3. [CLOSED] Button event is not firing in parent window from popup window
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 14, 2011, 7:35 PM
  4. [CLOSED] KeyDown Event Not Firing
    By JonG in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Jun 04, 2010, 1:57 PM
  5. [CLOSED] DateField OnSelectionChanged Event is not firing?
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Oct 09, 2009, 7:20 AM

Posting Permissions