If Google's javascript uses document.write to create the dynamic code  
(I don't know if it does, but I suspect so), then running it after  
your document has loaded can (and should) overwrite the document --  
poof, your page is gone.

The solution is to create and size an iframe element, then add the  
script tag to the iframe with your own document.open();  
document.write(); document.close();

Note: I haven't tried this with iGoogle gadgets, but I have had  
similar experiences.

Good luck.



On Sep 23, 2009, at 8:18 AM, JohnJ wrote:

>
> I am trying to do something like the following (I've tried w/ GWT and
> JQuery neither are quite working right).
>
> <script>
>
> var gadgetCode = '<script src="http://www.gmodules.com/ig/ifr?
> url=http://throttled.org/googlegadgets/
> youtubesearch.xml&amp;synd=open&amp;w=320&amp;h=250&amp;title=Search
> +YouTube&amp;border=%23ffffff%7C3px%2C1px+solid+
> %23999999&amp;output=js"></script>';
>
> $(document).ready(function(){
>    $('#container').html( gadgetCode );
> });
>
> </script>
> <body>
>
>         <div id="container"></div>
>
> </body>
>
>
> >

-- 

    Ben Curtis : webwright
    bivia : a personal web studio
    http://www.bivia.com/







--~--~---------~--~----~------------~-------~--~----~
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