If the result being returned from the server has leading and/or trailing blank spaces, then the if condition will always evaluate to false. Try using if( resp.indexOf("Email is available") >-1) instead.
Reputation Points: 116
Solved Threads: 243
Veteran Poster
Offline 1,123 posts
since Dec 2007