Hi Gavin,

The MAIN.XML has to call to your function. You can change your XML like
this:

<view height="100" width="100" resizable="true"
showCaptionAlways="true" onopen="getBT(btURL)">

Sorry, but I didn't test.

Best Regards,
Wagner.



On Fri, Jul 10, 2009 at 1:56 PM, Gavin <[email protected]> wrote:

>
> Hi Guys,
>
> I've been through a wide variety of posts and the SDK examples, but
> with no luck. I apologize if this is a duplicate post.
>
> I'm trying to create a desktop gadget that displays an HTML page (the
> link is to a JSP page). I'm using the designer to create the gadget.
> However, when I run preview, the page does not load. I'm using the
> examples (modified of course) from the YouTube desktop gadget.
>
> Here's my code -
>
> 1) MAIN.XML
>
> <view height="100" width="100" resizable="true"
> showCaptionAlways="true">
>  <script src="main.js" />
> </view>
>
> 2) MAIN.JS
>
> var btURL = 'http://www.google.com';
> var htmlDetailsView;
> getBT(btURL);
>
> function getBT(btURL) {
>
>  var http = new XMLHttpRequest();
>  http.onreadystatechange = getBTData;
>  http.open("GET", btURL, true);
>  http.send();
>
>
>        function getBTData() {
>
>                if (http.readyState == 4) {
>                                gadget.debug.error(http.responseText);
>
>                                plugin.closeDetailsView();
>                                htmlDetailsView = new DetailsView();
>                                htmlDetailsView.html_content = true;
>                                htmlDetailsView.setContent("", undefined,
> http.responseText,
> false, 0);
>
>                                htmlDetailsView.external = {};
>                                plugin.showDetailsView(htmlDetailsView,
> "Google.com",
> gddDetailsViewFlagNone, undefined);
>
>                                http = null;
>                }
>        }
> }
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Desktop Developer Group" 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-Desktop-Developer?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to