Link to home
Start Free TrialLog in
Avatar of DanielAttard
DanielAttardFlag for Canada

asked on

Load codeigniter controller and method from javascript

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:

	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"	  
		"\n\nSend password recovery information to this email address?"+
		"\n\nIf you need assistance, please call 888-526-9999.",
		//need to load a codeigniter controller here		
			$.msg("Password recovery information has been sent.\nPlease check your inbox",
			{header:'Password Sent', live:10000});
			$.msg("Password recovery information has NOT been sent.",
			{header:'Password Not Sent', live:10000});
	) //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);} 

Open in new window

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.
Avatar of mrh14852

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DanielAttard


thanks for the help.