Problem in getting Http Response in crome

Posted by Bhaskasr on Stack Overflow See other posts from Stack Overflow or by Bhaskasr
Published on 2010-04-05T06:05:39Z Indexed on 2010/04/05 6:13 UTC
Read the original article Hit count: 307

Filed under:
|

hi

Am trying to get http response from php web service in javascript , but am getting null in firefox and crome. plz tell me where am doing mistake here is my code,

function fetch_details() { if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest() alert("first"); } else { xhttp=new ActiveXObject("Microsoft.XMLHTTP") alert("sec"); } alert("hi."); xhttp.open("GET","http://122.166.97.94:8080/proxim_live/phpsend.php?UserID=881&DeviceID=Imm123&LastSyncDate=",false); xhttp.send(""); xmlDoc=xhttp.responseXML; alert(xmlDoc); alert(xmlDoc.getElementsByTagName("Inbox")[0].childNodes[0].nodeValue); }

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about xmlhttprequest