Error: uncaught exception: Permission denied to call method XMLHttpRequest.open
Tuesday, January 1st, 2008Thanks very much for the following articles as it solve my pain about ajax.
If you want to do cross-domain scripting with XMLHttpRequest, e.g. fetching data from a remote location but you’re on a local page or local XUL application (file:///), you need to tell Mozilla/Firefox about that, otherwise you get the infamous error:
Error: uncaught exception: Permission denied to call method XMLHttpRequest.open
Below is an example that can be run locally (save it to your harddisk and open the page with Mozilla/Firefox). It will fetch some RSS XML data from wunderground.com and alert it.
Always remember: XMLHttpRequest needs UniversalBrowserRead!
If the page with the XMLHttpRequest is on a http:// URI (on a webserver), it is not possible to fetch data from another domain!!! This is a security measure of Mozilla/Firefox.
Popularity: 42% [?]