Swap style sheets in iFrame contents based on parent window size
June 16, 2004
CSS | Javascript | Web Building

Link to this javascript in the head of the iFrame content document (the child document).

if (window.parent.screen.height >= 700) { document.write(''); } else { document.write(''); }

Of course this could be used for redoing the styles of the iFrame contents based on any other property of the parent document as well. For example you could say

Parent.document.body.some.property= 'a value"
instead of
window.parent.screen.height

Ads by Google

Posted by ellen at June 16, 2004 11:24 AM


Ads by Google

 RSS   |   Contact Me

Ads by Google

Ads by Google