I have a JS script already prepared for checking credit and debit cards
(switch cards in the UK).
Drop me an email offline if you'd like a copy.
Regards
Stephen
----- Original Message -----
From: "Douglas L. Brown" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 27, 2001 6:07 PM
Subject: OT Quick JS ?
> I have the following script in which I am validating a CC# but it always
> pops up the prompt even if the first digit is 4, can someone see my
> error?
>
> var type = target.card_type[target.card_type.selectedIndex].value;
> var number = target.card_number.value;
> var first_number = number.substring(0,1);
> if ( type == 'VISA' && first_number != 4){
> alert("Invalid Card Number");
> return false();
> }
>
>
>
> <CF_SIGNATURE
> NAME="Douglas L. Brown"
> EMAIL="[EMAIL PROTECTED]"
> PHONE="714.538.6611"
> WEB="http://www.carnivorepc.com">
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists