I'm designing an online survey, with one of the major features being that the questions are stored externally in an XML file, with random questions being loaded in each time. While the code I have works fine in Firefox, I get "Access is denied" errors when I try to load the page in Internet Explorer 8. I've isolated the problem to the following portion of code:
//Import the XML File
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5*/
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
//Import XML
xmlhttp.open("POST","Personalized Tour/questions.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
In particular, the error seems to be thrown on xmlhttp.open. I looked on several other websites for similar problems, and they seemed to suggest there was some kind of domain error that was triggering IE8's security settings. Is this the case, or is there more to it than that?
Thanks for your help.