Click to See Complete Forum and Search --> : How to know whether the iframe is fully loaded or not from the main html/jsp


christinjosy
August 8th, 2006, 05:11 AM
HI
In my main html I am calling one method of my child iframe. So what happens is that if the iframe is not fully loaded and if the main html is trying to call the html run time script error is coming.

To prevent that I have to know whether the iframe is fully loaded before calling the method in my main html

Is there any way?????

Pls help me ASAP.....

Bnt
August 8th, 2006, 07:59 AM
Hi,

Haven't tried this but it might work, declare a javascript variable at the top of the HTML page going to the IFrame as FALSE, then set it to true right at the bottom of the page. Check this variablke for TRUE from your other page to see if the page has been fully loaded.

PeejAvery
August 11th, 2006, 12:48 PM
Give the iframe an ID attribute.
<iframe id="theframe"></iframe>
Now, give it an onload command using the other window...
parent.getElementById('theframe').onload = ...