I want to validate an HTML form using Javascript.
Here is what I am doing
User clicks submit button for form
Data entered is bad, javascript sends out an alert box to say bad data, but how do I get the form to not get submitted?
I'm using the onClick event for the submit button.
My javascript looks something like this
function verify()
{
if (baddata)
{
alert "bad data"
}}
Here is what I am doing
User clicks submit button for form
Data entered is bad, javascript sends out an alert box to say bad data, but how do I get the form to not get submitted?
I'm using the onClick event for the submit button.
My javascript looks something like this
function verify()
{
if (baddata)
{
alert "bad data"
}}