It is always submitting form; How I can return false using AJAX; I knew AJAX is asynchronous;
if(theform.code.value!="")
{
$.ajax({
type:'post',
data:'action=codeverification&code='+theform.code.value,
url:'jquery-ajax.php',
success:function(html)
{
if(html=='false')
{
alert('Please enter correct code');
theform.code.focus();
flag=false;
}
}
})
}