XMLHttpRequest and Firefox Problem

G

gobera

There seems to be a problem with XMLHttpRequest and Firefox when the
function that makes the asynchrounous request is called from another
window. The request was made ok (open and send), but when trying to
retreive data from the object (like status or responseXML), it threw
the exception:

Error: [Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult:
"0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
http://localhost/js/common.js :: processReqChange :: line 65" data:
no]
Source File: http://localhost/js/common.js
Line: 65

The function that creates an XMLHttpRequest object and loads the XML
document is called loadXML (taken from
http://developer.apple.com/internet/webcontent/xmlhttpreq.html)
I solved the problem by wrapping the call to the loadXML function in
setTimeout("loadXMLDoc('"+url+"')", 0);

I don't know why it happened or why this worked, but this solved my
problem.
I hope this is useful to somebody with the same problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,742
Latest member
AshliMayer

Latest Threads

Top