在这里,当我提交我的表单并将检查 js 文件中的验证,然后将调用 kickerLogin() 函数得到警报消息datastring
,那么这不会发送到我在 ajax 中提到的 url 但会提交..... ......
function kickerLogin(){
alert('hello friends');
dataString=$('form[name=kickerLog]').serialize();
alert(dataString);
$.ajax({
type:"POST",
url:"<?php echo $GLOBALS['base_url']; ?>ajax/user-ajax.php?mode=kickerLogin",
cache: false,
data: dataString,
dataType: "json",
success: function(data) {
alert(data);
if(data.success == "yes")
{
$('#kickerLog').submit();
}
else if(data.success == "no")
{
if(data.status=="emailfail"){
$('li.log_error').show();
$('li.log_error').html("Email id not verified");
}
else if(data.status=="rejected"){
alert("Your account is inactive by admin");
}
else{
$('li.log_error').show();
$('li.log_error').html("Invalid Email / Password");
$("#loginEmail").css("border","1px solid red");
$("#loginPassword").css("border","1px solid red");
}
}
else {
alert(" Occured internal Error.please check network connection" );
}
}
});
}