Hi,
Till "Issue 720 - online API reference" <http://code.google.com/p/
support/issues/detail?id=720> on the issue tracker is resolved, I was
trying to find a way to integrate doxygen generated html into the
GoogleCode wiki in a better fashion than just adding a link to the
"raw" html file - which works, but takes you completely outside the
googlecode project interface
In this regard, I wondered if I could have a auto-height-adjusting
iframe containing the doxygen html as part of a wiki page. Since
iframes are not allowed but gadgets are, I took the google gadget
route.
A first attempt at a gadget with content type=url works but can only
be of fixed height.
My second attempt was to have content type=html, use makerequest() and
use the dynamic-height feature - this works and the height is adjusted
after the content is loaded, but it works only for the initial page,
if the content changes (clicking a link to load a new page in the
iframe), the onload event does not fire (my google re-search tells me
that this is by design)
My third (and latest) attempt was to embed a iframe inside the gadget,
have a onload listener for this embedded iframe (which would get
triggered with every content change) and inside the listener, change
the embedded iframe's height and also call
gadget.window.adjustHeight(). This didn't work because of cross-site
scripting protection because the gadget container is located at
gmodules.com. This is the code for the latest version -
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="" width="100%">
<Require feature="dynamic-height" />
</ModulePrefs>
<UserPref name="remote_url" display_name="Remote URL" required="true" /
>
<Content type="html">
<![CDATA[
<script type="text/javascript">
function doResize() {
var height =
document.getElementById('doxy').contentWindow.document.body.scrollHeight;
document.getElementById('doxy').height = height;
gadgets.window.adjustHeight();
};
</script>
<base href="__UP_remote_url__">
<iframe id="doxy" src="__UP_remote_url__" width="100%"
height="100%" frameborder="0" onload="doResize();" />
]]>
</Content>
</Module>
Is there anyway to achieve what I set out to - auto-height-adjusting
iframe in a wiki page?
Disclaimer: I'm not really a web developer - so pardon my ignorance if
I'm making some rookie mistake(s).
Regards,
Srivats
http://ostinato.googlecode.com
--
You received this message because you are subscribed to the Google Groups
"Project Hosting on Google Code" 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-code-hosting?hl=en.