Loading ...
Sorry, an error occurred while loading the content.
 

Re: how to get responseXML object

Expand Messages
  • Steven liao
    I already figured it out after review connection.js. It would be nice if the Yahoo examples could make it clear. Thanks a lot for your response. Steven
    Message 1 of 3 , Mar 16, 2006
      I already figured it out after review connection.js. It would be nice
      if the Yahoo examples could make it clear. Thanks a lot for your response.

      Steven

      --- In ydn-javascript@yahoogroups.com, "Thomas S. Sha" <tsha@...> wrote:
      >
      > --- In ydn-javascript@yahoogroups.com, "Steven liao" <liaod999@>
      > wrote:
      > >
      > > I am trying to use Connection Manager to get data from server but do
      > > not know how to get responseXML object in the success callback
      > > function. Connection Manager's description page is not clear on how to
      > > do it. Here is the text from Yahoo's description page:
      > >
      >
      -------------------------------------------------------------------------
      > > In a success case, an object with the following properties is passed
      > > to the callback object's success handler:
      > > property description
      > > tId The transaction id
      > > status The HTTP status code of the resulting transaction.
      > > statusText The message associated with the HTTP status.
      > > allResponseHeaders All returned HTTP headers available as a string.
      > > responseText The server's response as a string.
      > > responseXML The server's response as a XML DOM object.
      > > ----------------------------------------------------------------------
      > >
      > > but there is no clear explanation or example on how to get those
      > > objects in the callback function.
      > >
      > > Thanks for any help,
      >
      > Success and failure handlers both receive the response object as an
      > argument. For example, the function may look something like this:
      >
      > yourSuccessFunction(o){
      > //argument o is the response object
      > if(o.responseXML){
      > var sXml = o.responseXML;
      > }
      > }
      >
      > And, your callback object:
      > var callback = { success:yourSuccessFunction };
      >
      > Regards,
      > Thomas
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.