hi************@aol.com (HikksNotAtHome) wrote in message news:<20***************************@mb-m27.aol.com>...
In article <5f**************************@posting.google.com >,
kl*****@hotmail.com (Catherine Lynn Smith) writes:
I want to know the recommended way to handle scripting of/with
containers such as an iframe.
I would like, if possible, to have the parent window resize itself to
suit whatever is loaded into the iframe container, deriving the size
needed from calculated values. Thus the calculation would have to
over-ride default and/or previous settings for the size of the initial
iframe after all of the associated container content has been fully
loaded and rendered.
Any information and assistance is appreciated.
Set the IFrames width and height, same as you would a normal frame (if there is
such a thing). document.frames['IFrameName'].widht/height
I do intilize the iframe with a standard size then have it resize to
fit the size of the browser. Currently, the border design is built
around an 800x600 window size so I set a 'minimum' value for the x and
y that if the browser is made smaller than this amount, the border
content 'stops' getting smaller and the scroll bars thus turn on to
provide panning.
Due to the size of the borders, however, the center content area ends
up being only about 500x400 in size and some of the pages I want to
load into that iframe are going to need more size than this. I would
like, if it is possible, to 'read' the calculated minimum 'width' and
'size' from the iframe content after it is reloaded then reset the
minimum values for the total parent window size based on this center
content minimum width and height.
I currently have the scroll bars turned off on the iframe, and would
thus like to reset the minimum and redraw the borders so the parent
window scroll bars will facilitate panning of the entire page (center
content in the iframe + the borders on the parent window) but I am not
sure how to:
1) have the browser derive the 'needed' minimum size for the iframe
prior to doing any resizing of the parent window. (due to the fact
the iframe size is previously 'fixed' in size, any values I have tried
to extract from the DOM relate to it's present size)
2) I am still a tad confused on the scope between the iframe and the
parent window as far as navigating the DOM nodes is concerned or the
variables and assignments in the javascripting.
I am guessing that it may be necessary to hard code the sizing
requirements somewhere in all the center content pages which I would
like to avoid if possible should there be any way to derive the
necessary sizing values from calculated properties. But even if I
hard code or find a way to extract the necessary parameters, I am
still unclear on how to pass that information to the parent window or
extract the values from the iframe.
KL