Adjusted the height on load of the image. Thanks for the help anyway :) On 14 Okt., 14:57, Paul Lindner <lind...@inuus.com> wrote: > You'll want to put your adjustheight call inside of an on load handler > gadgets.util.registerOnLoadHandler(function() { > gadgets.window.adjustHeight(); > }); > > You code is probably running before the image loads. You may also want to > consider adding height/width tags to the image. > > On Tue, Oct 13, 2009 at 7:50 AM, John Smith <retrohe...@gmx.de> wrote: > > > I was trying to write a small gadget that shows a picture, which is > > specified in the userprefs, on igoogle. As there are pictures with > > different heights on the net I want to change the height of the gadget > > dynamically with gadgets.window.adjustHeight();. When I use this > > method the gadged gets indeed resized but only after I move it to > > another place in igoogle. The initial height after loading the gadget > > is always to small. > > > Here is the code: > > > <?xml version="1.0" encoding="UTF-8" ?> > > <Module> > > <ModulePrefs title="Battlefield Heroes Signature" > > description="Shows the Battlefield Heroes Signature or > > every other picture on your iGoogle-page." > > author="RHX"> > > <Require feature="dynamic-height"/> > > </ModulePrefs> > > > <UserPref name="mysignature" display_name="Signature URL:" > > default_value="http://elements.bplaced.net/rhx-sig.jpg"/> > > > <Content type="html"> > > <![CDATA[ > > <div > > style="text-align:center"><a > > title="Battlefield > > Heroes Signature" target="_blank" > > href=" > >https://www.battlefieldheroes.com/playnow"> > > <img border="0" > > alt="Signature" src="__UP_mysignature__" > > title="Play > > Battlefield Heroes!"></a> > > </div> > > <script > > type="text/javascript" language="javascript"> > > > gadgets.window.adjustHeight(); > > </script> > > ]]> > > </Content> > > </Module>
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "OpenSocial Application Development" group. To post to this group, send email to opensocial-api@googlegroups.com To unsubscribe from this group, send email to opensocial-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/opensocial-api?hl=en -~----------~----~----~----~------~----~------~--~---