resizing iframe

P

Paul Fi

I have this problem with iframes:

i want to resize iframe's height when the window inside the frame is
resized or when the src attribute of iframe changes so make the height
of iframe equal to the size window's body scrollHeight so that way i
dont need any scrolls for my iframe but the let page containing the
iframe do the scrolling for the iframe

so how can i make that happen, is one of the iframe events does detect
any changes to the contents inside it or when scr of the frame changes?

or is there an alternative?
 
E

Eliyahu Goldin

See if there is something useful for you in my case.

On one of my pages, I have an iframe in a table cell. The table has 2 rows.
The top contains a header. The bottom row contains the iframe. The height of
the table is calculated automatically based on the content of some other
cells. Now I want the iframe to resize to fill up tho whole height of the
containing cell. Given the iframe id is frameX, the table id is tableX and
the top row id is trTop, I use the folowing line in the body onload event:

document.getElementById('frmX').height=document.getElementById('tableX').off
setHeight-document.getElementById('trTop').offsetHeight;

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top