Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Browsers / Internet Explorer / August 2003



Tip: Looking for answers? Try searching our database.

iframe sizing revisited

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ben Geerdes - 26 Aug 2003 10:57 GMT
We are trying to dynamically size the content of an iframe, and believed to
have it working.
We found that in some cases it does not. The case being when the window is
containing the iframes is very small. Below follows a sample, save it to a
.htm file, load it, you should see 4 iframes. Then resize your ie window
(make it very small) and do a refresh. My ie6 will the only show 3 iframes.
Any workarounds/solutions are welcome.

Thanks

    Ben

<html xmlns:ms="urn:schemas-microsoft-com:xslt"><head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">BODY { color : black; background-color: #EDF2FC;
font-size: x-small; font-family: Arial, serif; } TR { font-family: Arial,
serif; font-size: 10pt; } A { color : #215DC6;{P.PHEADER1{ font-weight:
bold; } P.PFOOTER1 { font-style: italic; } TABLE.BACKGROUND1 {
background-color: #FFFFFF } TR.TRHEADER1 { font-weight: bold;
background-color: #BBDDFF; } TR.TRHEADER2 { font-weight: bold;
background-color: #BBDDFF; color : #215DC6; } TR.TRHEADER3 { font-weight:
bold; background-color: #E6E6E6; } TR.TRFOOTER1 { font-weight: bold;
background-color: #FFFFB9; } TR.TRFOOTER2 { font-weight: bold;
background-color: #FFFFB9; } TR.TRFOOTER3 { font-style: italic;
background-color: #FFFFB9; } TR.TRITEM1 { font-weight: bold;
background-color: #FFFFFF; } TR.TRITEM2 { font-weight: bold;
background-color: #E6E6E6; } TD.TDCOLORED1 { background-color: #E6E6E6; }
TD.TDHEADER1 { font-weight: bold; background-color: #BBDDFF; } TD.TDHEADER2
{ font-weight: bold; } TD.TDSUMMARY1 { color: black; font: bold 10pt Arial
; } TD.TDSUMMARY2 { color: black; background: #EDF2FC; font: 10pt Arial ; }
TD.TDSUMMARY3 { background-color: #CCFFD9; } TD.TDSUMMARY4 {
background-color: #CCFFD9; font-weight: bold; } A.ACAPTION:link { color :
#FFFFFF; text-decoration:none; font: bold 12pt Arial ; } A.ACAPTION:visited
{ color : #FFFFFF; text-decoration:none ; font: bold 12pt Arial ; }
A.ACAPTION:hover { color : #FFFFFF; text-decoration:underline; font: bold
12pt Arial ; } A.AITEM:link { color : black; text-decoration:none; font:
bold 10pt Arial ; } A.AITEM:visited { color : black; text-decoration:none;
font: bold 10pt Arial ; } A.AITEM:hover { color : black;
text-decoration:underline; font: bold 10pt Arial ; } A.AINF:link { color :
black; text-decoration:none; font: 10pt Arial ; } A.AINF:visited { color :
black; text-decoration:none; font: 10pt Arial ; } A.AINF:hover { color :
black; text-decoration:underline; font: 10pt Arial ; } A.ASMHEADER:link {
color : #215DC6; text-decoration:none; font: bold 10pt Arial ; }
A.ASMHEADER:visited { color : #215DC6; text-decoration:none; font: 10pt
Arial ; } A.ASMHEADER:hover { color : #215DC6; text-decoration:underline; }
A.ABTEXT:link { color : black; text-decoration:none; font: bold 10pt Arial
; } A.ABTEXT:visited { color : black; text-decoration:none; font: bold 10pt
Arial ; } A.ABTEXT:hover { color : black; font-weight: bold; font: bold 10pt
Arial ; text-decoration:underline; } A.ATEXT:link { color : black;
text-decoration:none; } A.ATEXT:visited { color : black;
text-decoration:none; } A.ATEXT:hover { color : black;
text-decoration:underline; } TABLE.TABLE_NB { border:0px; } TABLE.TABLE_INF
{ border:0px; width:100%; border-collapse:collapse; background: #EDF2FC; }
TABLE.TABLE_NAME { border:0px; width:100%; border-collapse:collapse;
background: #BBDDFF; } TR.TRNAME { color: black; } TABLE.TABLE_SUMMARY {
border: solid black 1px; width:100%; } TABLE.TABLE_ITEM { border:0px;
background: white; } TABLE.TABLE_CAPTION { width:100%; background:
#800000; } TR.TRCAPTION { color : white; font: bold 12pt Arial ; } TH.THITEM
{ color : black; font: bold 10pt Arial ; background: #BBDDFF; } TD.TDITEM1
{ color : black; font: bold 10pt Arial ; background: white; } TD.TDINF {
color : black; font: 10pt Arial ; } B.BRELATIE1 { color: black; font: bold
12pt Arial ; } B.BRELATIE2 { color: black; font: bold 12pt Arial ; }
TR.TRMAINCAPTION { background: #BBDDFF; } TABLE.TABLE_MNTOP { border: solid
black 1px; background: white; } TH.THMN_TOP { color : #215DC6; font: bold
12pt Arial ; background: #BBDDFF; } TD.TDMN_ITEM { color : black; font: bold
10pt Arial ; background: white; } TD.TDMN_INF1 { color : black; font: bold
10pt Arial ; background: silver; } TD.TDMN_INF2 { color : black; font: bold
10pt Arial ; background: silver ; } H2.H2MN_HEADER { color : black; font:
bold 10pt Arial ; background: silver ; } A.AMN_OPTION:link { color :
#215DC6; text-decoration:none; font: bold 10pt Arial ; }
A.AMN_OPTION:visited { color : #215DC6; text-decoration:none ; font: bold
10pt Arial ; } A.AMN_OPTION:hover { color : #215DC6;
text-decoration:underline; font: bold 10pt Arial ; } </style>
<script language="JavaScript">
function calcHeight(item)
{
var frm = document.frames(item.name);
item.width=frm.document.body.scrollWidth;
item.height=frm.document.body.scrollHeight;
}

function GetIframeText(Html_Source)
{
return '<html><body><style type="text/css">BODY { color : black;
background-color: #EDF2FC; font-size: x-small; font-family: Arial, serif; }
TR { font-family: Arial, serif; font-size: 10pt; } A { color :
#215DC6;{P.PHEADER1{ font-weight: bold; } P.PFOOTER1 { font-style: italic; }
TABLE.BACKGROUND1 { background-color: #FFFFFF } TR.TRHEADER1 { font-weight:
bold; background-color: #BBDDFF; } TR.TRHEADER2 { font-weight: bold;
background-color: #BBDDFF; color : #215DC6; } TR.TRHEADER3 { font-weight:
bold; background-color: #E6E6E6; } TR.TRFOOTER1 { font-weight: bold;
background-color: #FFFFB9; } TR.TRFOOTER2 { font-weight: bold;
background-color: #FFFFB9; } TR.TRFOOTER3 { font-style: italic;
background-color: #FFFFB9; } TR.TRITEM1 { font-weight: bold;
background-color: #FFFFFF; } TR.TRITEM2 { font-weight: bold;
background-color: #E6E6E6; } TD.TDCOLORED1 { background-color: #E6E6E6; }
TD.TDHEADER1 { font-weight: bold; background-color: #BBDDFF; } TD.TDHEADER2
{ font-weight: bold; } TD.TDSUMMARY1 { color: black; font: bold 10pt Arial
; } TD.TDSUMMARY2 { color: black; background: #EDF2FC; font: 10pt Arial ; }
TD.TDSUMMARY3 { background-color: #CCFFD9; } TD.TDSUMMARY4 {
background-color: #CCFFD9; font-weight: bold; } A.ACAPTION:link { color :
#FFFFFF; text-decoration:none; font: bold 12pt Arial ; } A.ACAPTION:visited
{ color : #FFFFFF; text-decoration:none ; font: bold 12pt Arial ; }
A.ACAPTION:hover { color : #FFFFFF; text-decoration:underline; font: bold
12pt Arial ; } A.AITEM:link { color : black; text-decoration:none; font:
bold 10pt Arial ; } A.AITEM:visited { color : black; text-decoration:none;
font: bold 10pt Arial ; } A.AITEM:hover { color : black;
text-decoration:underline; font: bold 10pt Arial ; } A.AINF:link { color :
black; text-decoration:none; font: 10pt Arial ; } A.AINF:visited { color :
black; text-decoration:none; font: 10pt Arial ; } A.AINF:hover { color :
black; text-decoration:underline; font: 10pt Arial ; } A.ASMHEADER:link {
color : #215DC6; text-decoration:none; font: bold 10pt Arial ; }
A.ASMHEADER:visited { color : #215DC6; text-decoration:none; font: 10pt
Arial ; } A.ASMHEADER:hover { color : #215DC6; text-decoration:underline; }
A.ABTEXT:link { color : black; text-decoration:none; font: bold 10pt Arial
; } A.ABTEXT:visited { color : black; text-decoration:none; font: bold 10pt
Arial ; } A.ABTEXT:hover { color : black; font-weight: bold; font: bold 10pt
Arial ; text-decoration:underline; } A.ATEXT:link { color : black;
text-decoration:none; } A.ATEXT:visited { color : black;
text-decoration:none; } A.ATEXT:hover { color : black;
text-decoration:underline; } TABLE.TABLE_NB { border:0px; } TABLE.TABLE_INF
{ border:0px; width:100%; border-collapse:collapse; background: #EDF2FC; }
TABLE.TABLE_NAME { border:0px; width:100%; border-collapse:collapse;
background: #BBDDFF; } TR.TRNAME { color: black; } TABLE.TABLE_SUMMARY {
border: solid black 1px; width:100%; } TABLE.TABLE_ITEM { border:0px;
background: white; } TABLE.TABLE_CAPTION { width:100%; background:
#800000; } TR.TRCAPTION { color : white; font: bold 12pt Arial ; } TH.THITEM
{ color : black; font: bold 10pt Arial ; background: #BBDDFF; } TD.TDITEM1
{ color : black; font: bold 10pt Arial ; background: white; } TD.TDINF {
color : black; font: 10pt Arial ; } B.BRELATIE1 { color: black; font: bold
12pt Arial ; } B.BRELATIE2 { color: black; font: bold 12pt Arial ; }
TR.TRMAINCAPTION { background: #BBDDFF; } TABLE.TABLE_MNTOP { border: solid
black 1px; background: white; } TH.THMN_TOP { color : #215DC6; font: bold
12pt Arial ; background: #BBDDFF; } TD.TDMN_ITEM { color : black; font: bold
10pt Arial ; background: white; } TD.TDMN_INF1 { color : black; font: bold
10pt Arial ; background: silver; } TD.TDMN_INF2 { color : black; font: bold
10pt Arial ; background: silver ; } H2.H2MN_HEADER { color : black; font:
bold 10pt Arial ; background: silver ; } A.AMN_OPTION:link { color :
#215DC6; text-decoration:none; font: bold 10pt Arial ; }
A.AMN_OPTION:visited { color : #215DC6; text-decoration:none ; font: bold
10pt Arial ; } A.AMN_OPTION:hover { color : #215DC6;
text-decoration:underline; font: bold 10pt Arial ; } </style>' + Html_Source
+ '</body></html>';
}
</script>
</head>
<body>
</p>
<iframe name="DBADBEN00AXDB6MBLT1" onload="calcHeight(this);" align="top"
VSPACE=3 frameborder="0" marginwidth="5" marginheigth="10" width="1"
heigth="1"  src="javascript:parent.GetIframeText('<table
class=&quot;TABLE_ITEM&quot;><thead><tr><th class=&quot;THITEM&quot;
nowrap><img
src=&quot;jit:helper_id=25515368,soort=i,plaatje=bezoek16.gif&quot;>&amp;nbs
p;<a
href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o
bject_class=TECAddress,object_key=DBADBEN00AXDB6MBLT,persoon_key=DBPEBEN00AX
7CPPI9U&quot;
class=ASMHEADER>Bezoekadres</a></th></tr></thead><tbody><tr><td nowrap><a
class=&quot;AITEM&quot;
href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o
bject_class=TECAddress,object_key=DBADBEN00AXDB6MBLT,persoon_key=DBPEBEN00AX
7CPPI9U&quot;>Louise de Colignyplein&amp;nbsp;5&amp;nbsp;<br>3708
CR&amp;nbsp;Zeist</a></td></tr></tbody></table>')"></iframe>
<iframe name="DBADBEN00AX7CPPIMX3" onload="calcHeight(this);" align="top"
VSPACE=3 frameborder="0" marginwidth="5" marginheigth="10" width="1"
heigth="1"  src="javascript:parent.GetIframeText('<table
class=&quot;TABLE_ITEM&quot;><thead><tr><th class=&quot;THITEM&quot;
nowrap><img
src=&quot;jit:helper_id=25515368,soort=i,plaatje=post16.gif&quot;>&amp;nbsp;
<a
href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o
bject_class=TECAddress,object_key=DBADBEN00AX7CPPIMX,persoon_key=DBPEBEN00AX
7CPPI9U&quot; class=ASMHEADER>Postadres</a></th></tr></thead><tbody><tr><td
nowrap><a class=&quot;AITEM&quot;
href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o
bject_class=TECAddress,object_key=DBADBEN00AX7CPPIMX,persoon_key=DBPEBEN00AX
7CPPI9U&quot;>Marterhoeve&amp;nbsp;3&amp;nbsp;<br>3831
TC&amp;nbsp;Leusden</a></td></tr></tbody></table>')"></iframe>
<iframe name="DBPHPETE0AXBH0PZKZ4" onload="calcHeight(this);" align="top"
VSPACE=3 frameborder="0" marginwidth="5" marginheigth="10" width="1"
heigth="1"  src="javascript:parent.GetIframeText('<table
class=&quot;TABLE_ITEM&quot;><thead><tr><th class=&quot;THITEM&quot;
nowrap><img
src=&quot;jit:helper_id=25515368,soort=i,plaatje=telefoon16.gif&quot;>&amp;n
bsp;<a
href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o
bject_class=TECPhone,object_key=DBPHPETE0AXBH0PZKZ,persoon_key=DBPEBEN00AX7C
PPI9U&quot; class=ASMHEADER>Telefoon</a></th></tr></thead><tbody><tr><td
nowrap><a class=&quot;AITEM&quot;
href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o
bject_class=TECPhone,object_key=DBPHPETE0AXBH0PZKZ,persoon_key=DBPEBEN00AX7C
PPI9U&quot;>015-3101234</a></td></tr></tbody></table>')"></iframe>
<iframe name="DBURPETE0AXBHFPG3V5" onload="calcHeight(this);" align="top"
VSPACE=3 frameborder="0" marginwidth="5" marginheigth="10" width="1"
heigth="1"  src="javascript:parent.GetIframeText('<table
class=&quot;TABLE_ITEM&quot;><thead><tr><th class=&quot;THITEM&quot;
nowrap><img
src=&quot;jit:helper_id=25515368,soort=i,plaatje=www16.gif&quot;>&amp;nbsp;<
a
href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o
bject_class=TECUrl,object_key=DBURPETE0AXBHFPG3V,persoon_key=DBPEBEN00AX7CPP
I9U&quot; class=ASMHEADER>WWW adres
(URL)</a></th></tr></thead><tbody><tr><td nowrap><a class=&quot;AITEM&quot;
href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o
bject_class=TECUrl,object_key=DBURPETE0AXBHFPG3V,persoon_key=DBPEBEN00AX7CPP
I9U&quot;>www.somecomp.com</a></td></tr></tbody></table>')"></iframe>
<p></p>
</body></html>
Brian Staff - 28 Aug 2003 06:05 GMT
I don't have an answer for you, but maybe this resource will help you.

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/om/measuring.asp

Brian Staff
> We are trying to dynamically size the content of an iframe, and believed to
> have it working.
[quoted text clipped - 149 lines]
> class=&quot;TABLE_ITEM&quot;><thead><tr><th class=&quot;THITEM&quot;
> nowrap><img

src=&quot;jit:helper_id=25515368,soort=i,plaatje=bezoek16.gif&quot;>&amp;nbs
> p;<a

href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o

bject_class=TECAddress,object_key=DBADBEN00AXDB6MBLT,persoon_key=DBPEBEN00AX
> 7CPPI9U&quot;
> class=ASMHEADER>Bezoekadres</a></th></tr></thead><tbody><tr><td nowrap><a
> class=&quot;AITEM&quot;

href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o

bject_class=TECAddress,object_key=DBADBEN00AXDB6MBLT,persoon_key=DBPEBEN00AX
> 7CPPI9U&quot;>Louise de Colignyplein&amp;nbsp;5&amp;nbsp;<br>3708
> CR&amp;nbsp;Zeist</a></td></tr></tbody></table>')"></iframe>
[quoted text clipped - 3 lines]
> class=&quot;TABLE_ITEM&quot;><thead><tr><th class=&quot;THITEM&quot;
> nowrap><img

src=&quot;jit:helper_id=25515368,soort=i,plaatje=post16.gif&quot;>&amp;nbsp;
> <a

href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o

bject_class=TECAddress,object_key=DBADBEN00AX7CPPIMX,persoon_key=DBPEBEN00AX
> 7CPPI9U&quot;
class=ASMHEADER>Postadres</a></th></tr></thead><tbody><tr><td
> nowrap><a class=&quot;AITEM&quot;

href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o

bject_class=TECAddress,object_key=DBADBEN00AX7CPPIMX,persoon_key=DBPEBEN00AX
> 7CPPI9U&quot;>Marterhoeve&amp;nbsp;3&amp;nbsp;<br>3831
> TC&amp;nbsp;Leusden</a></td></tr></tbody></table>')"></iframe>
[quoted text clipped - 3 lines]
> class=&quot;TABLE_ITEM&quot;><thead><tr><th class=&quot;THITEM&quot;
> nowrap><img

src=&quot;jit:helper_id=25515368,soort=i,plaatje=telefoon16.gif&quot;>&amp;n
> bsp;<a

href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o

bject_class=TECPhone,object_key=DBPHPETE0AXBH0PZKZ,persoon_key=DBPEBEN00AX7C
> PPI9U&quot; class=ASMHEADER>Telefoon</a></th></tr></thead><tbody><tr><td
> nowrap><a class=&quot;AITEM&quot;

href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o

bject_class=TECPhone,object_key=DBPHPETE0AXBH0PZKZ,persoon_key=DBPEBEN00AX7C
> PPI9U&quot;>015-3101234</a></td></tr></tbody></table>')"></iframe>
> <iframe name="DBURPETE0AXBHFPG3V5" onload="calcHeight(this);" align="top"
> VSPACE=3 frameborder="0" marginwidth="5" marginheigth="10" width="1"
> heigth="1"  src="javascript:parent.GetIframeText('<table
> class=&quot;TABLE_ITEM&quot;><thead><tr><th class=&quot;THITEM&quot;
> nowrap><img

src=&quot;jit:helper_id=25515368,soort=i,plaatje=www16.gif&quot;>&amp;nbsp;<
> a

href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o

bject_class=TECUrl,object_key=DBURPETE0AXBHFPG3V,persoon_key=DBPEBEN00AX7CPP
> I9U&quot; class=ASMHEADER>WWW adres
> (URL)</a></th></tr></thead><tbody><tr><td nowrap><a class=&quot;AITEM&quot;

href=&quot;jit:helper_id=25515368,soort=a,action=details_menu,verwijzing=1,o

bject_class=TECUrl,object_key=DBURPETE0AXBHFPG3V,persoon_key=DBPEBEN00AX7CPP
> I9U&quot;>www.somecomp.com</a></td></tr></tbody></table>')"></iframe>
> <p></p>
> </body></html>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.