Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback on: irt.org FAQ Knowledge Base Q2036

irt.org | About | Feedback | 3039 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q2036

Sent by
Matthew Johnson on August 01, 2001 at 13:54:49:

Worth:
Worth reading

Length:
Just right

Technical:
Just right

Comments:
You CAN in-fact resize a floating frame (an IFRAME) via script. You create the frame with their width and height set to 100%, then you constrain the frame inside a table's cell. When you resize the cell, the frame sticks to it and voila - resizes!

Sample:

<HTML>
<BODY>
<CENTER>
<BR>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR><TD ID="displayArea" WIDTH="500" HEIGHT="500">
<IFRAME SRC="yourpage.htm" WIDTH="100%" HEIGHT="100%"></IFRAME>
</TD></TR>
</TABLE>
<BR>
<A HREF="javascript:changeRes(640,480)">640x480</A> -
<A HREF="javascript:changeRes(800,600)">800x600</A> -
<A HREF="javascript:changeRes(1024,768)">1024x768</A><BR>
</CENTER>
<SCRIPT LANGUAGE="JavaScript">
function changeRes(x,y) {
displayArea.width=x;
displayArea.height=y;
}
</SCRIPT>
</BODY>
</HTML>






Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.