Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Height & Width of Iframe from src page

Status
Not open for further replies.

okiiyama

IS-IT--Management
Jan 3, 2003
269
US
I don't think that its possible, but is there a way to set the height and/or width attribute of an IFRAME using the iframe source's inner width or inner height?

 
Nevermind, I figured it out. It is doable.
In the Iframe's source page I've got the javascript:
Code:
window.parent.document.getElementById("Test1").height = document.body.scrollHeight;
			window.parent.document.getElementById("Test1").width = document.body.scrollWidth;
"Test1" is the iframe's id.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top