shane07 Posted October 29, 2008 Share Posted October 29, 2008 Here is my xmlrequest code if(window.ActiveXObject) { xmlRequest = new ActiveXObject("Microsoft.XMLHTTP"); } else { xmlRequest = new XMLHttpRequest(); } xmlRequest.open("GET", pageUrl, true); xmlRequest.send(null); xmlRequest.onreadystatechange=function() { if(xmlRequest.readyState==4) alert(xmlRequest.responseText); } It works fine in www.mysite.com but in mysite.com (without www) it doesn't work both in IE and firefox. Infact there is an error which says 'uncaught exception:[Exception... "Access to restricted URI denied" (In firefox). IE says 'Permission denied' when clicking on yellow question mark Quote Link to comment Share on other sites More sharing options...
corbin Posted October 29, 2008 Share Posted October 29, 2008 The domain/subdomain have to match. My guess would be that pageUrl is an absolute URI which points to www.mysite.com. AJAX cannot cross domains, thus, you are getting an access error. Quote Link to comment Share on other sites More sharing options...
BoltZ Posted October 30, 2008 Share Posted October 30, 2008 Could you perhaps show us your site in which this error occurs? ^^ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.