By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,109 Members | 993 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,109 IT Pros & Developers. It's quick & easy.

How to use the Ext.Msg.confirm with ajax inside?

Exequiel
100+
P: 287
When I'm not use the Ext.Msg.confirm the ajax is properly process. but when i put the ajax inside of the confirm it does not work. . . how can i use the confirm in ext with ajax? . . Thank you :)
Expand|Select|Wrap|Line Numbers
  1. Ext.Msg.confirm('Message', 'Delete this data?', function(btn, text){
  2.                               if(btn == 'Yes'){
  3.                                   Ext.Ajax.request({
  4.                                     url: '<?php echo base_url();?>index.php/process/deleteme',
  5.                                     params:{
  6.                                         user_id : user_id
  7.                                     },
  8.                                     success:function(msg){
  9.                                         store.reload();
  10.                                     },
  11.                                     failure: function(resp) {
  12.                                         Ext.Msg.alert('System Message','Could not connect to the database.');
  13.                                     }
  14.                                 });
  15.                             }
  16.                         });
Jul 24 '13 #1
Share this Question
Share on Google+
1 Reply


Exequiel
100+
P: 287
I got it already. . I capitalized the Y in if(btn == 'yes'). hehe. . sorry
Jul 24 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.