Hi there,

the sample code you have provided is pretty much all you need. What
you have not shown here is the encapsulation with the XML gadget spec,
which would result to something like that:

<?xml version="1.0" encoding="UTF-8"?>
<Module>
  <ModulePrefs title="400 chars of http://www.Google.com"; />
  <Content type="html">
  <![CDATA[
    <script>
      _IG_FetchContent('http://www.google.com/', function
(responseText) {  alert(responseText.substr(0,400));});
    </script>
  ]]>
  </Content>
</Module>

Give this a short on the Google Gadget Editor here:
http://code.google.com/apis/gadgets/docs/legacy/gs.html

and you will notice the 400 chars of the page will be displayed in
your warning popup. The content includes mainly some style (CSS)
definition for the page.

What else are you trying to do?

Happy New Year!

Jerome

On Dec 31, 2:25 am, "[email protected]" <[email protected]> wrote:
> Hello
> I'd like to use code below to print the first 400 characters of
> Google's homepage HTML.
> Could anybody tell me what I should add to this code that it'd work ?
>
> code:
> _IG_FetchContent('http://www.google.com/', function (responseText) {
>    // print the first 400 characters of Google's homepage HTML
>    alert(responseText.substr(0,400)); });
--~--~---------~--~----~------------~-------~--~----~
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