Är nybörjare på JavaScript, och vet inte (har ingen aning) om vad som är fel:
<SCRIPT LANGUAGE="JavaScript">
<!--
/* This JavaScript checks the variables and alert if they're wrong! */
function controllValues(){
if(email == ""){
alert("Please fill in all inputs marked with a *!")
}
if(password == ""){
alert("Please fill in all inputs marked with a *!")
}
if(login == ""){
alert("Please fill in all inputs marked with a *!")
}
}
-->
</SCRIPT>
Börja med att ändra på onClick="controllValues()" till onSubmit="return controllValues(this)"
Sedan scriptet;
function controllValues(formobj){
if(formobj.email.value == ""){
alert("Please fill in all inputs marked with a *!");
return false;
} else if(formobj.password.value == ""){
alert("Please fill in all inputs marked with a *!")
return false;
} else if(formobj.login.value == ""){
alert("Please fill in all inputs marked with a *!")
return false;
} else {
return true;
}