I am using jquery ajax in conjunction with $.confirm and I need to figure out how I can load a codeigniter controller/method in response to the $.confirm. Here is the code:
$.ajax({
url: sURL + "utility/ajaxFind_In_tblClients",
type: "POST",
data: {ClientNum: ClientNum},
dataType: 'json',
success: function(json) {
$.confirm("The email address registered to this account is:\n\n"
+json.ClientEmail+
"\n\nSend password recovery information to this email address?"+
"\n\nIf you need assistance, please call 888-526-9999.",
//YES
function(){
//need to load a codeigniter controller here
$.msg("Password recovery information has been sent.\nPlease check your inbox",
{header:'Password Sent', live:10000});
$('#ajaxShield').hide();
},
//NO
function(){
$.msg("Password recovery information has NOT been sent.",
{header:'Password Not Sent', live:10000});
$('#ajaxShield').hide();
}
) //end of confirm
}, //end of success: function(json), could be YES or NO inside
error:function (xhr, ajaxOptions, thrownError){ alert('Problem with utility/ajaxFind_In_tblClients Status code:'+xhr.status+', Error:'+thrownError);}
});
Looks like I need help for what to do at line 14. I don't know how to load the codeigniter controller after the user responds "Yes" to the $.confirm. Any ideas? Thanks.