J
Joel Spolén
For some reason my form does'nt work as I wont it to do, big surprise 
Anyway the problem is that when you click on submit you call the function
verifiera() and the function checks that everything is ok, but sadly it
continues to the next page even though I written
return false;
Don't know why, is there anyone who can say what I'm doing wrong!
here is the code
<script language="JavaScript">
function verifiera() {
if (document.gastbok.namn.value.length < 2) {
alert("Skriv ditt fullständiga namn.");
return false;
}
if (document.gastbok.textarea.value.length < 1) {
alert("Du måste skriva något för att skicka inlägget.");
return false;
}
return true;
}
</script>
Anyway the problem is that when you click on submit you call the function
verifiera() and the function checks that everything is ok, but sadly it
continues to the next page even though I written
return false;
Don't know why, is there anyone who can say what I'm doing wrong!
here is the code
<script language="JavaScript">
function verifiera() {
if (document.gastbok.namn.value.length < 2) {
alert("Skriv ditt fullständiga namn.");
return false;
}
if (document.gastbok.textarea.value.length < 1) {
alert("Du måste skriva något för att skicka inlägget.");
return false;
}
return true;
}
</script>