Try this instead; it’s worked for me:
var xhr = false;
if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else { if (window.ActiveXObject) { try { xhr = new ActiveXObject(“Microsoft.XMLHTTP”); } catch (e) { } }
function makerequest(serverPage, objID){ var obj = document.getElementById(objID);
xhr.onreadystatechange = function() { if (xhr.readystate == 4 && xhr.status == 200){ obj.innerHTML = xhr.responseText; } else { obj.innerHTML = “There was a problem with the request ” + xhr.status; } }
xhr.open(“GET”, serverPage, true); xhr.send(null); }
You must be logged in to post a comment.
Powered by Yahoo! Answers
Comments
Leave a comment Trackback