Hi
I have validation on my basket with a 'return false' on a conditional test yet the form is submitting. Can you see what I am doing wrong?
My form tage has the onsubmit() tag:
my js goes like this:
I have validation on my basket with a 'return false' on a conditional test yet the form is submitting. Can you see what I am doing wrong?
My form tage has the onsubmit() tag:
Code:
<form method="post" onsubmit="return myFunction();">
Code:
function myFunction() {
do some stuff;
if (conditional test is false)
{
alert("show this message");
return false; // inhibit click
}
return true; // allow click
}
Comment