Forum Moderators: open

Message Too Old, No Replies

is it possible to check if a frame failed to load its content?

frames in same domain

         

Xuefer

4:44 pm on Jan 14, 2003 (gmt 0)

10+ Year Member



i have frameset contain 2frames
the 1st loaded
then the 2nd.
is it possible for the 1st frame to check whether the 2nd failed to load its content?

gsx

5:23 pm on Jan 14, 2003 (gmt 0)

10+ Year Member



Yes. You nned to use JavaScript, though:-

1: Set a variable (say "isitloaded") in the parent frameset using JavaScript, before the <frameset> tags.
2: In the second frame page: Set this variable (parent.isitloaded) in the second page on the OnLoad event to something different.
3: In the first frame page: You can refer to the above variable (parent.isitloaded) to check if it has loaded.

There are restrictions: I don't think you can set up a loop to wait until the page 2 has loaded, this will cause an infinite loop in some browsers as it will stop loading the second page whilst the first is running JavaScript.

Xuefer

2:30 am on Jan 15, 2003 (gmt 0)

10+ Year Member



i can use timer to do the check
but, in fact, i need to check "fail" no "success"