On Aug 10, 3:37 am, jamesDBA <[email protected]> wrote:
> I write code using Jquery as following but it is not working.
Always include the errors.  It's hard to troubleshoot when we don't
know what went wrong.

> I am not sure if I can use Jquery in Gadget.Thanks!
Yes, you can, since gadgets are just webpages running in iframes.

> Any recommendation will be highly appreciated.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Module><ModulePrefs title="hello world example" />
> <Content type="html"><![CDATA[
> <html>
> <head>
> <script type="text/javascript" src="http://www.google.com/jsapi";></
> script>
> <script>
> google.load("jquery", "1.3.2");
> </script>
> </head>
> <body>
> jQuery Test
> <script>
> jQuery.ajax({
>   type: "GET",
>   url: "https://snoopy.ceesharp.com";,
This will fail because you are getting denied by the same origin
policy.  Gadgets are served from *.gmodules.com while you're trying to
retrieve from ceesharp.com.  One option would be to use
gadgets.io.getProxyUrl to get a cached version from Google:
http://code.google.com/apis/gadgets/docs/reference/#gadgets.io.getProxyUrl

>   success: function(msg){
>     alert( "Success!\n\n " + msg );
>   }});
If you had defined an error function as well you might have gotten
some important debugging information.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iGoogle 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/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to