faqts : Computers : Programming : Languages : JavaScript : Frames

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

16 of 25 people (64%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How can I set the height and width of an iFrame depending on the browser window width and height?

Jul 14th, 2002 00:44
meng xianhui, Phil S., mengxianhui


In your Iframe Page:
parent.document.getElementById("iframeIdName").style.width = 
window.document.body.scrollWidth + 20
parent.document.getElementById("iframeIdName").style.height = 
window.document.body.scrollHeight + 20