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