When you use gadgets.io.RequestParameters.CONTENT_TYPE does the request
return a DOM element?  I try to encourage people to use the enumeration
types vs. the string literals for these values.  If the string value
changes, it can be very hard to debug your program.

~Arne



On Feb 8, 2008 11:22 PM, :nikhil_gupte <[EMAIL PROTECTED]> wrote:

>
> I seem to have got the real problem;
>
> If you pass the param as 'contentType' instead of
> gadgets.io.RequestParameters.CONTENT_TYPE, response.data is returned
> as a string.
>
> On Feb 9, 10:56 am, ":nikhil_gupte" <[EMAIL PROTECTED]> wrote:
> > Arne,
> >
> > Thanks for the Firebug tip, I was already using it...
> >
> > I've done what you said and I can see the contents of response.data
> > However, it's type (typeof response.data) returns "string".
> >
> > response.data.childNodes is *undefined*
> >
> > On Feb 9, 3:17 am, "Arne Roomann-Kurrik" <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Hi Nikhil,
> >
> > >    Sorry, that should be response.data.childNodes.
> >
> > >    You may be interested in installing Firebug (
> https://addons.mozilla.org/en-US/firefox/addon/1843)  With Firebug
> > > installed you can just do console.log() on an object to see what
> properties
> > > are available.
> >
> > > ~Arne
> >
> > > On Feb 8, 2008 12:13 PM, :nikhil_gupte <[EMAIL PROTECTED]> wrote:
> >
> > > > Hi Jason,
> >
> > > > That didn't work... I get:
> > > > response.data.children has no properties
> >
> > > > On Feb 8, 5:31 am, Jason <[EMAIL PROTECTED]> wrote:
> > > > > Hi!
> >
> > > > > This Wiki page has several gadgets.io.makeRequest() samples that
> are
> > > > > fully compatible with version 0.7 of the OpenSocial API
> specification:
> >
> > > > >
> http://code.google.com/p/opensocial-resources/wiki/GadgetsMakeRequest
> >
> > > > > It looks like you need to use the response's data property. Check
> to
> > > > > see if this works:
> >
> > > > > alert(response.data.children.length);
> >
> > > > > Cheers!
> > > > > - Jason
> >
> > > > > On Feb 7, 4:11 am, ":nikhil_gupte" <[EMAIL PROTECTED]> wrote:
> >
> > > > > > That is for 0.6. I need to use 0.7 i.e. with
> gadgets.io.makeRequest
> >
> > > > > > On Feb 7, 4:18 pm, "Tiago Takamoto" <[EMAIL PROTECTED]>
> wrote:
> >
> > > > > > > Hi,
> >
> > > > > > > I don't know the difference between gadgets.io.makeRequest and
> > > > > > > gadgets,makeRequest but
> > > > > > > the example here:
> > > >http://code.google.com/apis/opensocial/docs/0.6/devguide.html#XML
> > > > > > > works fine to me.
> >
> > > > > > > Hope that I help.
> >
> > > > > > > Takamoto
> >
> > > > > > > On Feb 7, 2008 6:28 AM, :nikhil_gupte <[EMAIL PROTECTED]>
> wrote:
> >
> > > > > > > > Ive' tried:
> > > > > > > > gadgets.io.makeRequest(url, function(response)
> > > > > > > > {doSomething(response);}, {'method' :
> gadgets.io.MethodType.GET,
> > > > > > > > 'contentType' : gadgets.io.ContentType.DOM});
> >
> > > > > > > > but It doesn't seem to return XML since
> response.firstChildreturns
> > > > > > > > undefined.
> > > > > > > > response.data/text/errors is available, but then how does
> one
> > > > parse
> > > > > > > > xml using them? I don't think response.data is treated as a
> DOM.
> >
> > > > > > > --
> > > > > > > Tiago Takamoto
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to opensocial-orkut@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to