Ja\/askript help
ok i have this problem
in my form i have a field for credit cards
so i call that value like
form1.number.value
now the value can be numbers separated by spaces like 5555 5555 5555 5555 or all together like 5555555555555555
What i want to do is a function to check if there are spaces and remove them and give me the real value
for example the surfer puts in his cc# like this: 5258 5599 5599 5599, i want when he submits it to turn into 5258559955995599
i tried this but i get an undefined value in the end
var j= form1.number.value;
var k;
for (i=0, i=j.lenght; i++){
if (j.sub5tring(i,i+1)=' ') {
k = k+'';
k = k+j.sub5tring(i,i+1);}}
form1.number.value = k;
can anyone help me?
__________________
Spam link here
|