Jump to content

Runtime Error - Loading File


lilman

Recommended Posts

I am getting a runtime error on I.E. but not on FireFox.  Below is the code:

 

function ajaxLoader(url,id)
{
if (document.getElementById) 
{
	var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
}

if (x)
{
	x.onreadystatechange = function()
	{
		if (x.readyState == 4 && x.status == 200)
		{
			el = document.getElementById(id);
			el.innerHTML = x.responseText; // This is the line it says the error is happening on
		}
	}

	x.open("GET", url, true);
	x.send(null);
}
}

 

 

Link to comment
https://forums.phpfreaks.com/topic/53314-runtime-error-loading-file/
Share on other sites

el.innerHTML = x.responseText; // This is the line it says the 

what is the resonseText?  ie can be finicky about what you try to innerHTML into something.  it can have problems with forms, complex html, and js.  Or are you trying to inject a block level item into an inline item, like innerHTML a div or a ul into a span? You can't do that.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.