How could the following code sometimes evaluate to false?
(transport.responseText == \'1\' ||
transport.responseText == \'CARD_VALID\')
M
Try capturing the value of responseText
into a different variable before entering that code block, in case the variable is updated somewhere in there.
I don't have that much experience directly using XmlHttpRequest, but I do know that javascript has a number of places where it uses volatile references to interface objects that can change during execution, rather than a simple value.