I am using the following ajax function
function validatec()
{
var coupon = jQuery('#validateC').val();
var data = "coupon="+coupon;
$.ajax({
type : 'POST', //Method type
url : 'https://sainicomputers.co.in/exam/index.php/login/test/', //Your form processing file URL
data : data,
async : false,
success: function(msg) {
if(msg > 0)
{
}
else
{
alert("Please enter a valid Coupon Code");
}
return false;
}
});
}
What I want to do is that when the result is received from ajax call then I dont want to load the page. but this code is not working how can I do this ?