SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: AJAX problem - plz help
Threaded View
-
Apr 10, 2007, 13:53 #1
AJAX problem - plz help
Greetings,
this is my javascript function which handles response:
function handleResponse()
{
if((http.readyState == 4)&&(http.status == 200)){
var response = http.responseText.split('|');
alert(response[0] ); // here it displays true or false it runs last condition instead of going in first or second condition
if(response[0] == 'true'){
alert("oh yes");
}else if(response[0] == 'false'){
alert("oh no");
}else{
alert("nothing");
}
}
}
when response[0] = true or false it executes last condition instead of going in first or second condition . Any idea?
Please help!
Thanks in advance
Bookmarks