Click to See Complete Forum and Search --> : uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)


ariell
October 2nd, 2008, 12:05 PM
Hi there,

I am first and foremost used to C code, stuff that has to be compiled prior to its usage. Now, confronted with that "asynchronous javascript and xml" (as I learned this name is abbreviated for), I am running into that problem:

uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)
(showing up after XMLHttpRequest() is properly initialized, on invocation of its open()-method)

Thanks to FireBug, I FOUND this error. I have serious doubts that otherwise I could have catch it. The "restricted URI" is "everything" - no matter whether I've put the destination to a root folder or SOMEwhere, this exception sustains.

Any AJAX guru(s) who feel they can help me out?

Thanks in advance.

ariell
October 3rd, 2008, 05:38 AM
Done. I've found a solution. One more evidence that AJAX is not a "system" but just an idiom.
And thanks for the tons of help!

matias1331
October 3rd, 2008, 08:29 AM
hi, I'm having the same problem, can you plz explain how you fix it?', what the problem might be??, what's the solution??.

thx in advnace
Daniel

ariell
October 3rd, 2008, 10:32 AM
What EXACTLY is your problem?

In MY case, it was something like "request.open("GET",url,true)" whereas url was (out of the sudden) considered "restricted".

Let me know.

antranidox
November 22nd, 2008, 11:54 AM
i found out that:

this don't work!
request.open("GET", "http://www.thedomainname.com/resp.php?wohin=" + wohin, false);

this works:
request.open("GET", "http://thedomainname.com/resp.php?wohin=" + wohin, false);
(without "www")

farazilu
February 5th, 2009, 04:15 AM
i am having the same problem when page is onpen in HTTPS. but removing www does not work for me is there any other soloutin??

PeejAvery
February 5th, 2009, 03:46 PM
i found out that:

this don't work!
request.open("GET", "http://www.thedomainname.com/resp.php?wohin=" + wohin, false);

this works:
request.open("GET", "http://thedomainname.com/resp.php?wohin=" + wohin, false);
(without "www")
That is because cross-domain references are not allowed. You probably had accessed the site without the www, so it would have to be without the www in the AJAX request as well.

i am having the same problem when page is onpen in HTTPS. but removing www does not work for me is there any other soloutin??]
Are you attempting to access a different domain than the one you to which you are already connected? As already mentioned, AJAX does not allow cross-domain references.