7 messages in com.googlegroups.google-gadgets-api[Google-Gadgets-API] Re: Regarding na...
FromSent OnAttachments
Rajat28 May 2008 11:49 
Justin McConnell28 May 2008 16:44 
Rajat28 May 2008 21:16 
abowman (Guru)28 May 2008 21:56 
Justin McConnell29 May 2008 13:16 
Jerome (Guru)29 May 2008 21:16 
Rajat30 May 2008 09:23 
Subject:[Google-Gadgets-API] Re: Regarding native xmlhttprequest
From:Rajat (life@gmail.com)
Date:05/30/2008 09:23:22 AM
List:com.googlegroups.google-gadgets-api

thanks a lot to everyone for this !!

On May 29, 9:17 pm, "Jerome (Guru)" <jero@gmail.com> wrote:

Rajat,

Justin and Adam already gave you some good workarounds. Another one you can consider is to change your gadget to a type url. In this case, as your gadget is only an iframe rendering a web page on your website, you can use xmlhttprequest to make request form this iframe to your web service on the same domain. gmodules.com is no longer rendering your gadget.

Jerome

On May 29, 3:17 pm, Justin McConnell <bool@gmail.com> wrote:

On May 28, 9:17 pm, Rajat <life@gmail.com> wrote:

Its the cross domain security issue with Xmlhttprequest , is it ?

Yes

so, if i host the gadget on the same server from which i am requesting the xml, then it would work ?

Yes but, in this instance, you can't.  Gadgets always come from google servers like xx.gmodules.com or xx.sandbox.gmodules.com.  This is why You have the _IG_Get and IG_Fetch functions, to proxy around the same origin policy.

On May 28, 4:45 pm, Justin McConnell <bool@gmail.com> wrote:

On May 28, 11:49 am, Rajat <life@gmail.com> wrote: ...

I was wondering if i could use the same in igoogle gadgets to request an object or do i have to use the wrapper function provided by the api only.

You are not forced to use the wrapper. XMLHttpRequest will work.

My attempt to use the xmlhttprequest object gave me an "access denied".

Are you trying to get data from your own server? Gadgets are served from google servers, even if the XML spec resides on your own.  So any XMLHttpRequest calls will be limited by the same origin policy.- Hide quoted
text -

- Show quoted text -