Dynamic IFrame - Setting the height based on the actual content (For widgets, but also for the dashboard)


#1

Hello,
I would like to adjust the height of the iframe based on the real dynamic content. The documentation speaks about a fixed height of 350, but in such case I have big iframes with small widgets, since I’m using several widgets, one after the other.
There is a big space between the widgets.
onload=“this.style.height=this.contentDocument.height” inside the iframe doesn’t help.

While embedding the dashboard based on the documentation, the dashboard doesn’t include all the data and the user needs to scroll down.
onload=“this.style.height=this.contentDocument.height” inside the iframe doesn’t help.

A more efficient solution is probably the ‘Dynamic Asynch Iframe’, which I haven’t tried yet: Iframe loading techniques and performance

Version: 1.1.1

Any help would be appreciated,
Menashe


(Matthieu Aubry) #2

menashe_e if you find the solution to this problem (making the iframes height increase of the widgets height is higher) please let us know and we will put it in Piwik

The dashboard doesn’t use widgets, the HTML is inlined in the page, so there is not this problem