[Javascript] Help - Form Validation
Peter Brunone
peter at brunone.com
Fri Aug 22 16:43:19 CDT 2003
Simeon,
For what it's worth, I never rely on onSubmit; all my forms use
an input type button which triggers the validation routines, which then
submit the form if appropriate. But enough of my personal beliefs...
Have your button trigger a third function called RunValidation,
for example, that does this:
function RunValidation() {
var whatever = runDataValidation();
var whatnot = runCardValidation();
if(whatever == whatyouthink && whatnot == whatitshouldbe) {
doWhateverIsNecessaryToSubmitTheForm;
}
}
Let us know if you need more guidance, but that's the basic
approach.
Cheers,
Peter
-----Original Message-----
From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu] On Behalf Of Simeon Willbanks
Sent: Friday, August 22, 2003 4:35 PM
To: javascript at latech.edu
Subject: [Javascript] Help - Form Validation
Hello All,
I am trying to get two form validation scripts to work together. Right
now, the credit card validation works on a onclick from a input button.
The dada validation works on a onsubmit from the submit button. Is it
possible to get the scripts to work together from the onsubmit?
CardValidation.js
http://www.simeons.net/twtdesigns/html05/js/CardValidation.js
DataValidation.js
http://www.simeons.net/twtdesigns/html05/js/DataValidation.js
Form
http://www.simeons.net/twtdesigns/html05/start.htm
Any help would be greatly appreciated.
Thanks,
Simeon
--------------------------------------
visit: http://www.simeons.net
listen: http://www.georgia-avenue.com
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list