Delete Confirmation?

  1. #1

    Delete Confirmation?

    Hi,

    I am trying to display confirmation dialog before sending request to server. But when i click the button, the confirmation dialog pops up but the request goes to server without me clicking Yes or No.

    Here's my code.

    var btnDelete = new Button("Delete");
                        btnDelete.ID = DeleteName;
                        btnDelete.AccessKey = "d";
                        btnDelete.Click += CmdDeleteClick;
                        btnDelete.AutoPostBack = true;
                        btnDelete.Icon = Icon.PageDelete;
    
                        this.Items.Insert(i++, btnDelete);
    
                        btnDelete.Listeners.Click.Handler = "Ext.Msg.confirm('Delete Records', 'Are you sure?', function (btn) { if (btn == 'yes') return true; else return false;});";
    Can you please tell me what i am doing wrong?

    Regards,
    Huzefa
  2. #2
  3. #3
    But then how will the Click event be called if i place a DirectEvent.
    I don't want Ajax Call in this case. A Postback is required.

Similar Threads

  1. Replies: 0
    Last Post: Jul 23, 2010, 6:35 AM
  2. Replies: 2
    Last Post: Dec 25, 2009, 2:56 PM
  3. Delete confirmation on gridpanel
    By danni in forum 1.x Help
    Replies: 2
    Last Post: Mar 26, 2009, 11:24 PM
  4. Button with Confirmation Delete...
    By Maia in forum 1.x Help
    Replies: 16
    Last Post: Mar 11, 2009, 9:59 AM
  5. [CLOSED] GridPanel Delete Confirmation
    By Zarzand in forum 1.x Help
    Replies: 4
    Last Post: Nov 06, 2008, 5:24 PM

Tags for this Thread

Posting Permissions