How can I determine proper height of an Iframe subpage?

M

Michael

<A href="http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm">Iframes
SSI Script II</a>

My Test page below has a Prayer in it that randomly loads a new prayer
each time someone clicks on the prayer itself. The 1st prayer does not
have the proper HEIGHT in it though. Because each prayer is randomly
selected. Each prayer has a different HEIGHT & WIDTH. For testing
purposes I have included a test page. You can load the test page to
see how the prayer does not have the proper HEIGHT IFrame. Then click
on it to load a new prayer and to see it resize itself. Then feel free
to examine the Javascript & HTML code to figure out how to get the
iframe to determine the proper HEIGHT the 1st time when the page loads
in the browser.

This script resizes an IFrames HEIGHT when content is loaded into it.
It works great. The problem is that the first time it appears it does
not use the proper HEIGHT. I think because I did not give it one. The
reason I did not give the IFrame a HEIGHT value is because each
sub-page loaded into it is randomly selected. The HEIGHT & width are
different each time. I get around the width issue by giving it a value
of 100%. But how can I get the script to apply the proper Height value
the first time the page loads?

Part 2:
If anyone can help me with the width problem too, that would be
great!! How can I get the script to resize to the proper HEIGHT &
WIDTH each time? Because each sub-page in the IFrame is RANDOMLY
SELECTED.


Here is the URL for my <a
href="=http://www.geocities.com/mdh2972/Iframe/IFrames_Test.html">TEST
PAGE</a>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top