4 messages in com.googlegroups.google-gadgets-apiRe: _IG_AdjustIFrameHeight() little p...
FromSent OnAttachments
Dragos23 Dec 2007 10:53 
Jerome (Guru)23 Dec 2007 22:39 
Dragos24 Dec 2007 04:38 
Dragos27 Dec 2007 11:26 
Subject:Re: _IG_AdjustIFrameHeight() little problem
From:Jerome (Guru) (jero@gmail.com)
Date:12/23/2007 10:39:24 PM
List:com.googlegroups.google-gadgets-api

I had a look at your gadget on IE and Firefox, and as far as I can tell, the resizing was happening as expected.

An idea to make this consistently working, you could fire off another resize on a timer to start 1 second after the first one. I use this especially in case where the gadget displays some images with unknown height. If the resize call is done right after the gadget content has been loaded, the images are most of the time still loading and have an undefined height.

If you want to try this quick and dirty solution, replace your call to resize with: setTimeout('_IG_AdjustIFrameHeight()', 1000); _IG_AdjustIFrameHeight();

Adjust the 1000 to whatever number of millisecond suits your need.

Jerome

On Dec 23, 12:53 pm, Dragos <drag@gmail.com> wrote:

Well the problim consists in _IG_AdjustIFrameHeight() function which does not resize the div when needed. Here is my gadget
:http://hosting.gmodules.com/ig/gadgets/file/116278270822222518623/Gad... . It should resize the div after new content is loaded but it resizes the div before the content is loaded, so it happens that some text is sometimes cut in a half or many white space rests in the div. So how and when should i call the _IG_AdjustIFrameHeight() resize function so my div perfectly fits with the content inside?