Skip to content


Accessing Sites on Different Domains With AJAX

After reading posts from Dare Obasanjo aka Carnage4Life and Links on the Semantic Web I noticed that some people are having problems when making AJAX calls from one serer to another.

I believe is the problem that most would come across:
Error: uncaught exception: Permission denied to call method XMLHttpRequest.open in Mozilla Firefox.

And here is the fix: Just insert this block of code right before you declare the new XMLHttpRequest object:


try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
} catch (e)
{
alert("Permission UniversalBrowserRead denied.");
}

I sure hope this helps some people.
[tags]AJAX, web2.0, web 2.0[/tags]

Posted in Ajax.

Related Posts

  • None Found

One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Anand says

    I tried this approach with jquery. Somehow it didn’t work.

    Thanks anyways.

    Cheers :)



Some HTML is OK

or, reply to this post via trackback.

CommentLuv Enabled