Hi,
Yes, it is not possible to use XMLHttpRequest in the Gadget, and not because
it is a Gadget issue but because of the Single Origin restriction that a
browser puts in. In short, a Single Origin restriction means that a page
from domain Y can not access contains from domain X. In your case the gadget
domain is the gmodule domain of Orkut (since you gadget runs inside Orkut or
any container) and the code sitting there is trying to access youtube
domain.

In order to get around this, the Gadget provides special apis to fetch
contents from URLS (from any sites). The method you need to be using is
gadgets.io.makeRequest. Here is the documentation and code snippets for
this.

1. http://code.google.com/apis/opensocial/docs/0.7/reference/gadgets.io.html
2. http://code.google.com/p/opensocial-resources/wiki/GadgetsMakeRequest

Hope this helps you.
-Rohit
Google Developer Programs

Join us at Google's biggest developer event of the year
May 28-29, San Francisco
http://code.google.com/events/io

On Thu, May 22, 2008 at 7:04 AM, sb <[EMAIL PROTECTED]> wrote:

>
> Hello guys
>
> Im new to developing gadgets. I had glanced through the tutorial but
> may be I missed things somewhere.
>
> Can't I use XMLHttpRequest in a gadget for placing asynchrounous
> request ?
>
> I trimmed down a lot of junk and posted only the necessary gadget code
> here on http://gadgetssb2008.googlepages.com/MyWorld1.xml
>
> Can you guyes help me out in figuring out the issue ?
>
> Thanks
> sb
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to [email protected]
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