Thread: java script
View Single Post
 
Old March 22nd, 2006, 04:10 AM
joefawcett's Avatar
joefawcett joefawcett is offline
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Assuming your validation function is called validateData you need to return false from it if the validation fails, true otherwise.
In your form's onsubmit attribute you need:
Code:
<form name="frmdata" onsubmit="return validateData();" ...>
--

Joe (Microsoft MVP - XML)