sks198117 Posted January 9, 2007 Share Posted January 9, 2007 Hi all,below is my codei'm getting error in IEerror: htmlfile:Unknown runtime errorcan anyone help me regarding this errorthanks in advance************************var xmlHttpfunction showDeals(mobID,netID){ xmlHttp=GetXmlHttpObjectDeal() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="deals.asp" url=url+"?mobID="+mobID+"&netID="+netID+"&sid="+Math.random() xmlHttp.onreadystatechange=stateChangedDeal xmlHttp.open("GET",url,true) xmlHttp.send(null)}function stateChangedDeal() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { alert(xmlHttp.responseText) document.getElementById("tblBodyContent").innerHTML=xmlHttp.responseText }} function GetXmlHttpObjectDeal(){ var objXMLHttpDeal=null if (window.XMLHttpRequest) { objXMLHttpDeal=new XMLHttpRequest() } else if (window.ActiveXObject) { objXMLHttpDeal=new ActiveXObject("Microsoft.XMLHTTP") } return objXMLHttpDeal} Link to comment Share on other sites More sharing options...
jesh Posted January 9, 2007 Share Posted January 9, 2007 Do you have any idea where the error is occurring (i.e. the line number)?You build the URL like this: var url="deals.asp"url=url+"?mobID="+mobID+"&netID="+netID+"&sid="+Math.random() What happens when you type that resulting URL into the address bar of your browser rather than using AJAX. Does it load as you would expect?Does the alert in your stateChangedDeal function pop up with the contents of the responseText?Without any further info, my only suggestion at the moment is to use: xmlHttp.send(""); Rather than: xmlHttp.send(null) Link to comment Share on other sites More sharing options...
sks198117 Posted January 12, 2007 Author Share Posted January 12, 2007 i'd alert the response text.that is fine but no any changes in inner html.....any idea? Link to comment Share on other sites More sharing options...
SunTzu Posted January 12, 2007 Share Posted January 12, 2007 Is it working if you try innerText? Link to comment Share on other sites More sharing options...
Webworldx Posted January 12, 2007 Share Posted January 12, 2007 does tblBodyContent happen to be a <tbody>? IE won't let you insert HTML directly into the TBODY, you'll need to insert it into the row or td. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now