How could the following code sometimes evaluate to false?
(transport.responseText == \'1\' || transport.responseText == \'CARD_VALID\')
M
Try using === to match exactly (type and value). This is the recommended comparison operator in javascript.
===
Check the datatypes of the strings to make sure, and look for hidden unicode or control characters in both strings.