Focal Point
capturing the contents in the iframe

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7311094491

November 02, 2006, 10:22 PM
Balaji Gavini
capturing the contents in the iframe
hi,
I am displaying the report in the iframe. when the report is large i am getting scrollbars for the iframe.I want to avoid that. Based on the report width and height i want to size my iframe.Please help me in this regard.Please give me suggestion if there is any other alternate solution
November 03, 2006, 09:52 AM
Bernie Ott
using the 'height', 'width', 'left', and 'right' properties of the frame, you can retrieve/set those values.

Assuming your frame has an id (unique identifier in HTML Layout properties) of 'FRAME1', then you can retrieve the width with:

 
var current_width = document.getElementById('FRAME1').style.width;
 


and you can set the width with:

 
document.getElementById('FRAME1').style.width='100px';
 


Make sure you include the 'px' at the end of the #.
November 03, 2006, 11:19 PM
Balaji Gavini
hi bernie,
the code which you have given gets the width and height of the iframe but not the contents of the iframe. I want to get the size of the content inside the iframe so that i can resize my frame accordingly
November 05, 2006, 06:01 PM
Bernie Ott
Try looking at this site:

http://www.kali.com/~elvi/foo/depo1/foo/dyna/dynamicdri...dex17/iframessi2.htm