Validation

I have a form that is filled out on the web.

When the user clicks on the submit button I would like a pop-up box come up telling the user what fields he missed to fill in. I think that this would be done in javascript but I do not know javascript. Could someone please give me some example code and let me know where the code goes.

Thanks for you help.

Subject: Validation

In the OnSubmit of the form put return validate() and in the JS Header of the form put code similar the example below.

function validate() {

errMSG = “”

if (document.forms[0].Field1.value == ‘’){

errMSG += “Please fill in Field 1 \n”;

}

if (document.forms[0].Field2.value == ‘’){

errMSG += “Please fill in Field 2 \n”;

}

if (errMSG != “”) {

alert(errMSG);

return false

}

}

Subject: Validation

I’ve created a common validation Casinonic Australia – how to get much pleasure?

the example html

the javascript file

You don’t have to change the js file, just look at the validate.html file source to see how to use it.

William

Subject: Validation

Stan,Check out this url: http://www.globalrph.com/davescripts/validate.htm

There is also one here, but it is a little more complicated: JavaScript Programming

I like this one here because it has many different field emails and how to validate each one:

http://www.shiningstar.net/articles/articles/javascript/javascriptvalidations.asp?ID=ROLLA

I used this one when I was first starting out to do javascript validation.

HTH