PDA

View Full Version : IFrames SSI Script II



mdh2972
09-10-2004, 07:49 PM
Iframes SSI Script II (http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm)

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 length in it though. Because each prayer is randomly selected. Each prayer has a different LENGTH & 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 length 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 length when content is loaded into it. It works great. The problem is that the first time it appears it does not use the proper length. I think because I did not give it one. The reason I did not give the IFrame a Length value is because each sub-page loaded into it is randomly selected. The Length & 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 TEST PAGE. (http://www.geocities.com/mdh2972/Iframe/IFrames_Test.html)