I found this pretty nice cc validation script out on the net ... but I had
to make some modifications to it.
I'm having a weird problem with it, however.
Here is the relevant function:
function validCCForm(ccTypeField,ccNumField)
{
var result =
isValidCreditCardNumber(ccNumField,ccTypeField.value,"Credit Card
Number",true);
if (result == true){
return true;
}
else {
return false;
}
The final function of a rather complex script.
Now to my way of thinking, if it returns false, it means the script isn't
valid; in fact the proper alert pops up. But then the form submits anyway.
Now I thought if a return was false, the form wouldn't submit. But this
keeps submitting.
Here's the event handler:
onClick="validCCForm(this.form.ccType,this.form.ccNum);"
If you need to see the whole script, let me know and I'll send it to you
directly.
H.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Owens
Internet Operations Coordinator
InsideVC.com/Ventura County Star
[EMAIL PROTECTED]
AIM: GoCatGo1956
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4