Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback on: irt.org FAQ Knowledge Base Q2036, on August 01, 2001 at 13:54:49:

You are here: 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>





©2018 Martin Webb