var myIFrame = new IFrame({ src: 'test.html', 'id' : 'test', 'name' : 'test', styles: { width: 800, height: 600, border: '1px solid #ccc' }, events : { 'load' : function(){ this.setStyle('height', window.test.getScrollSize().y ); } } })
This isn't a 100% full proof but it should point you in the right direction. I set both the name and id to the same on the frame because I recall there is some reference issues with some browsers (IE). I also set the load event. So when the iframe is loaded I traverse into the frame and find the ScrollSize height and set the iframe height as such. On Mon, Sep 15, 2008 at 3:58 AM, websam <[EMAIL PROTECTED]> wrote: > > I have been trying to find a way to set the height on a iframe > depending on > the height of the content in the page i'm loading in the iframe. > > But have not been able to do that. I'm using the iframe class within > mootools: > > var myIFrame = new IFrame({ > src: 'test.html', > styles: { > width: 800, > height: 600, > border: '1px solid #ccc' > } > }); > > Can anyone help me solve this issue ? >