Massimo Camplone

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromMassimo Camplone
ToMe
SubjectInclude iframe in miniwindow
Date13 February 2004 07:56
Hi, I'm developing an intranet in which I would like to use a 'mini windows'
script as yours.
I'm learning yours script and I'm trying to using iframe inside, but its
contents it's not automatically resizable with the miniwindows dimensions.
What's the right DOM path to give right width and height to iframe?
Thank's a lot, your site is my favourits source for ideas.
FromMe
ToMassimo Camplone
SubjectRe: Email validation with PHP
Date13 February 2004 08:23
Massimo,

I have dealt with this problem before in a previous email:
http://www.howtocreate.co.uk/emails/Yoshi.html

The best way is to give the iframe an id and use getElementById.
You can either set the height and width of the iframe to 100% after the
page has loaded (some browsers have problems with this), or you can use
setInterval to resize the iframe to the correct size.

If you want to resize using a setInterval timer, you can use
setInterval('resz();',200);
function resz() {
  var ifr = document.getElementById('iframeID');
  ifr.height = ifr.parentNode.offsetHeight - 4;
  ifr.width = ifr.parentNode.offsetWidth - 4;
}


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.