jQuery call: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<form name="registerFormF" class="loginForm" method="post" action="" enctype = "multipart/form-data"
onsubmit = 'checkRegisterJS(
document.registerFormF.registerEmail.value,
document.registerFormF.registerPassword.value,
document.registerFormF.registerPasswordCheck.value,
document.registerFormF.registerSubmit.value)'; return false;>
<div class = "headerLoginForm">
<h1>Register here</h1>
</div>
<div class = "contentLoginForm">
<input type= "text" name="registerEmail" class="input username" placeholder = "Your email." required = "required" />
<input type= "password" name="registerPassword" class= "input password" placeholder = "Your password." required = "required" />
<input type= "password" name="registerPasswordCheck" class= "input password" placeholder = "Your password again." required = "required" />
</div>
<div class = "footerLoginForm ">
<input type="submit" name="registerSubmit" value="Register now" class="button" />
</div>
</form>
function checkRegisterJS(registerEmail,registerPassword,registerPasswordCheck,registerSubmit)
{
$('#loadingmessage').show();
$('#chooseAction').hide();
$.ajax({
type: "POST",
url: "phpFiles/checkRegister.php",
data: {
registerEmail: registerEmail,
registerPassword: registerPassword,
registerPasswordCheck:registerPasswordCheck,
registerSubmit:registerSubmit
},
datatype: "html",
success: function(msg){
if(parseInt(msg)==1)
{
alert('ko');
}
else
{
alert('k');
}
}
})
}
Where is the problem? Thanks.