I am trying to validate a form with Javascript. I have simplified my code as much as possible and the form still submits.
Here is my HTML code:
The first form submits, but the second one doesn't.
You can find the page at: http://www.avidity.zzl.org/test.html
Here is my HTML code:
Code:
<html>
<head>
<title>Test Form</title>
<script>
function submit(){
return false;
}
</script>
</head>
<body>
<form onsubmit="return submit();" >
<input type="submit" name="submitbutton" value="Submit Form 1" />
</form>
<form onsubmit="return false;" >
<input type="submit" name="submitbutton" value="Submit Form 2" />
</form>
</body>
</html>
The first form submits, but the second one doesn't.
You can find the page at: http://www.avidity.zzl.org/test.html