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.
Printable View
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.
You could put your call to the other page in a function and use SetTimeout to call it.
here's something I'm playing with at the moment
(it might be IE only though)
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.Code:while(parent.framename.document.readyState !== "complete")
{
//loop
}
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?