PDA

Click to See Complete Forum and Search --> : Frame loading problem


msdnexpert
Oct 18th, 2000, 06:39 AM
Hi all,
I have got 2 frames on my HTML page. The Onload event of the first frame document accesses a form element in the second frame document. How do I ensure that the second frame document has been loaded completely before I access its elements.

monte96
Oct 18th, 2000, 10:18 AM
You could put your call to the other page in a function and use SetTimeout to call it.

Mark Sreeves
Oct 19th, 2000, 02:46 AM
here's something I'm playing with at the moment
(it might be IE only though)


while(parent.framename.document.readyState !== "complete")
{
//loop
}


I am playing with this to try to automate page printing. I'm using a ScriptX component to print the frame once it has finised loading.

Sometimes it waits sometimes not. I intend to find out why today!

In fact, I've just had an idea! What you could do is have a function on page one which tests a flag using SetTimeout and have the flag set by a function on page 2 which is called from its onload event.

did that make sense to you?