I have the following code that works fine in IE:
Code:
function divLoadHtml(sDiv, sURL)
{
var objXMLHTTP, e
try { objXMLHTTP = new XMLHttpRequest(); }
catch (e) { try { objXMLHTTP = new ActiveXObject('Msxml2.XMLHTTP'); }
catch (e) { try { objXMLHTTP = new ActiveXObject('Microsoft.XMLHTTP'); }
catch (e) { objXMLHTTP = null; }}}
objXMLHTTP.open( "GET", sURL, false );
objXMLHTTP.send();
document.getElementById(sDiv).innerHTML = objXMLHTTP.responseText;
return;
}
However, in Firefox I get the error NS_ERROR_DOM_BAD_URI when I call it in Firefox.
Doing some research, I found a reference that says I cannot access files on another domain which is a problem. I need to access XML data on a domain different than the domain from which this code is executed.
Does anyone know of a work-around, other than forcing everyone to use IE (ugh)?
Last edited by dnavarrojr; 10-28-2008 at 04:52 PM..
|