AJAX AJAX:Problem in responseText if condition equal to responseText but fall to else

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

You should use console.log() instead of alert() when debugging, especially if you are concerned about potential whitespace. It's not really possible to see things like that in alert() boxes, however in the console everything is printed out in a much more readable form that better allows you to see (and debug) variables.

Other than that, since I can't actually run your code I would just have to ask about using the strict comparison operator (===) vs the more common and standard equals operator (==). Logically you shouldn't need the strict comparison since you probably won't have to worry about types in this instance.

"Given billions of tries, could a spilled bottle of ink ever fall into the words of Shakespeare?"