Question : amex card

this works fine for 4digit textboxes
when one textbox has 4digits, it goes to next textbox  
this works for a visa credit card




I want to change to amex credit card  3 textboxes of
4 6 5


NOTE: deleting the last textbox and changing the other textboxes to 4,6,5
does not work

I think the javascript must be changed


1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
<?php
 
?>


<script language="javascript">
    function only(which, next, numberOfDigit,min,max) {
        which.value = which.value.replace(/\D/g,'');
        if( (which.value.length != numberOfDigit) || (parseInt(which.value)<min) || (parseInt(which.value)>max) ) {
            which.focus();    
        }
        else {
            document.getElementById(next).focus();
        }
    }
</script>


   Card Number<input type="text" name="card1" id="card1" size="4" maxlength="4" onkeyup="only(this, 'card2', 4, 0, 9999);" onblur="only(this, 'card2', 4, 0, 9999);" />
   -<input type="text" name="card2" id="card2" size="4" maxlength="4" onkeyup="only(this, 'card3', 4, 0, 9999);" onblur="only(this, 'card3', 4, 0, 9999);" />
   -<input type="text" name="card3" id="card3" size="4" maxlength="4" onkeyup="only(this, 'card4', 4, 0, 9999);" onblur="only(this, 'card4', 4, 0, 9999);" />
   -<input type="text" name="card4" id="card4" size="4" maxlength="4" onkeyup="only(this, 'month', 4, 0, 9999);" onblur="only(this, 'card1', 4, 0, 9999);" />

Answer : amex card

It's XMLAttributes (plural)

<cfdump var="#SiteNow[i].XmlAttributes['EntID']#">
Random Solutions  
 
programming4us programming4us