Hello, Thank you for your mail. Sorry for not explaining the problem properly.
Here I explain exactly what the problem is. I have the following code in my gadget. <div id="content_div" height="100%" width="100%"> <iframe id="ranking" name="ranking" src="http://www.mysite.html" style="border:none" scrolling="yes"></iframe> </div> Inside my HTML there are certain our application specific tags which are parsed and servet is called. The servlet queries database and data is displayed in HTML. The data has Title and Detail values. The Title is displayed on the screen and Detail is kept hidden until user clicks + image. When the user clicks the plus (+) image, the Detail is displayed on the screen, just as CNN.com gadget. So far so good. The Detail is displayed on clicking plus (+) and hidden on clicking minus (-). However the google iFrame or the gadget iFrame is not dynamically expanded and contracted. I have used <Require feature="dynamic-height"/> but I can not find a way to call _IG_AdjustIFrameHeight(); when + or - is clicked. I need a way to call _IG_AdjustIFrameHeight(); whenever user clicks on + or - sign. I have been trying for last 1 week for this but with no success. I just wonder how CNN.com does it, and if there is any API available! Please not that I have only one <div> containing <iframe> in my gadget. Your help will be heartly appreciated. Thanking you in advance. Regards, Amit Parmar. On Tue, Sep 15, 2009 at 3:58 PM, bickerdyke <[email protected]> wrote: > > What is wrong with > > if (gadgets.util) > { > newApi = true; > prefs = new gadgets.Prefs(); > gadgets.util.registerOnLoadHandler(init); > } > else { > alert("oldapi"); > newApi = false; > prefs = new _IG_Prefs(); > _IG_RegisterOnloadHandler(init) > } > > function resize() { if (newApi) gadgets.window.adjustHeight(); else > _IG_AdjustIFrameHeight();} > > // combined with > > function changeClassVisibility( targclassname, bVis ) > { > // get all elements > obj = document.getElementsByTagName("*"); > > // itarate all elements > for (i=0; i<obj.length; i++) { > /* element with classname that matches the stuff to hide? */ > if ( obj[i].className == targclassname ) { > with ( obj[i] ) { > if (bVis) style.display = "inline"; > else style.display = "none"; > } > } > } > resize(); > } > > > // to show/hide stuff? > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
