T
Ted Byers
Here is the beginning of the function:
print "function validateFormData(vtf2) {
var x = vtf2.ccn.value
var msg = \"\";
var newline = \'CR\';
if (x==null || x==\"\") {
vtf2.ccn.bgColor=\"lightred\";
msg.concat(\"\\r\\n\",\"Credit card number must be
provided\");
}
if (!isNumber(x)) {
msg.concat(\"\\r\\n\",\"Credit card number must be a
number\");
}
x = vtf2.ccexp.value
if (x==null || x==\"\") {
msg.concat(\"\\r\\n\",\"Credit card expiry date must be
provided\");
alert(msg);
return false;
}
I managed to get this function to be executed, but it only displays
the first "Credit card number must be provided", but not the second
"Credit card expiry date must be provided'. The concatenation looks
like it is working, at least the first time. But what can be the
problem. Is there a limit t the number of times concat can be called
on a string, or is alert limited in terms of the number of lines of
text it can display?
Any insights that can be provided would be appreciated.
Thanks
Ted
print "function validateFormData(vtf2) {
var x = vtf2.ccn.value
var msg = \"\";
var newline = \'CR\';
if (x==null || x==\"\") {
vtf2.ccn.bgColor=\"lightred\";
msg.concat(\"\\r\\n\",\"Credit card number must be
provided\");
}
if (!isNumber(x)) {
msg.concat(\"\\r\\n\",\"Credit card number must be a
number\");
}
x = vtf2.ccexp.value
if (x==null || x==\"\") {
msg.concat(\"\\r\\n\",\"Credit card expiry date must be
provided\");
alert(msg);
return false;
}
I managed to get this function to be executed, but it only displays
the first "Credit card number must be provided", but not the second
"Credit card expiry date must be provided'. The concatenation looks
like it is working, at least the first time. But what can be the
problem. Is there a limit t the number of times concat can be called
on a string, or is alert limited in terms of the number of lines of
text it can display?
Any insights that can be provided would be appreciated.
Thanks
Ted