XML.com: XML From the Inside Out

XML.comWebServices.XML.comO'Reilly Networkoreilly.com
  Articles | Weblogs | Newsletter | Safari Bookshelf
advertisement

Article:
 Very Dynamic Web Interfaces
Subject: responseXML lost across windows?
Date: 2005-06-09 10:42:10
From: JJG

I am trying to use XMLHttpRequest in a client-side firefox plugin. I want to open a sign-in dialog, and then use the user's input to send a GET request to the server for authorization.


Unfortunately, the XMLHttpRequest's responseXML always comes in null if I let the dialog close before the server response is received. The call is being made on a global object which is created in the main plugin overlay, to which the request is attached. The actual request object is maintained (I verified that it was the same by setting the value of a property when the request is created and checking it in my request change listener), but the responseXML is nulled out. If I put in an alert that prevents the dialog from closing before the response is received, all is well.


I tried the theadsafe version posted here, but no dice. My only guess is that the responseXML object is temporarily placed on the current window during processing, and it is getting lost when my dialog gets destroyed. Any insight, suggestions for workarounds, or examples of similar code would be appreciated.


Previous Message Previous Message   Next Message Next Message

Sponsored By:


Contact Us | Our Mission | Privacy Policy | Advertise With Us | | Submissions Guidelines
Copyright © 2008 O'Reilly Media, Inc. | (707) 827-7000 / (800) 998-9938