November 02, 2006, 10:22 PM
Balaji Gavinicapturing 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 Ottusing 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 Gavinihi 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