Sunday, 11 August 2013

why the ajax code dont work good?

why the ajax code dont work good?

Sorry for my english...
why this ajax code dont work good?
when i call the POST variable in the page that i send for him the info,
its show me that the POST variable is not exist... why?
part of the ajax code:
var xhr = new XMLHttpRequest();
xhr.open("POST",url,true);
xhr.onreadystatechange = function() {
if( this.readyState == 4 && this.status == 200) {
document.getElementById(name).innerHTML = this.responseText;
}
};
xhr.send("info="+str+"&info_1="+info_1+"&info_2="+info_2);
return false;

No comments:

Post a Comment