Jump to content

AJAX problem in IE


Recommended Posts

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

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:


Rather than:


Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...