return data in $.get method
hi,
I have a strange problem when I use the $.get method.
I have been develop a little js function to check a simple state. The js function call a php page ... like this
if ( ... ) {
echo "no";
} else {
echo "yes";
}
my js function is like that ....
$.get('test.php',function(data) {
if(data=="no") {
window.location = "no.php";
} else {
window.location = "yes.php";
}
})
now ... when I use an local installation all works fine .... but when I put the source on my web hosting space the site doesn't work.
With firebug I found that 'data' value is not "no" or "yes" but "\r\nyes\r\n".
I have been try to use 'dataType' (text) ... but nothing to do ... same error.
Have you any ideas?
thank you!!