Aug 06, 2011, 5:41 PM
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.
Regards,
Huzefa
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