193
rated 0 times
[
198]
[
5]
/ answers: 1 / hits: 20070
/ 12 Years ago, wed, november 28, 2012, 12:00:00
I'm using AJAX to retrieve data from MYSQL database through PHP.
However, if there is no result found, the variable still has two spaces. I found the problem using alert(data.length);
. The result is 2, which means there are two spaces.
How can I remove these spaces so that if there is no result, I could display a message using if(data == ''){}
?
Thank you!
More From » javascript