I want to specify the controller path inside the .ajax function of jquery.
type:'POST',
url:"<?php site_url('login/validate'); ?>",
//dataType: "json",
data:data1,
success: function (response){
//alert (response);
$("span.error").html('Congrats! You are successfully registered with our site').addClass('error');
//window.location="site";
},
Currently i am doing this but the path is taken as a string. Its going into the success function i dont know whay? but when i alert the response it gives an error of "Disallowed key characters"