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:

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

I sure hope this helps some people.

[tags]AJAX, web2.0, web 2.0[/tags]