1

I have a frameset with two frames. Upper frame reloads a document in the lower frame by changing its location property. I need to catch in the upper frame the onload event fired in the lower frame.
This code does not work, though no errors are produced either:

//this script runs in frames[0]
top.frames[1].location = "test.htm";
top.frames[1].onload = function( ) { alert('Thanks!'); };

The test,htm is loaded in the lower frame, but the alert does not appear.
What is the easiest way to do that?
Thanks!

GreenBear
  • 373
  • 1
  • 6
  • 18
  • See the last answer here: http://stackoverflow.com/questions/4548984/detect-if-the-iframe-content-has-loaded-successfully – glortho Nov 11 '12 at 01:49
  • Hi, glortho! Thanks for the help! I coded a workaround: I catch the onload event of the lower frame in the lower frame, and from that event I call a function in the upper frame. This will suffice for now. I just wonder if it is possible to catch the onload event if the lower frame comes from a different domain and I do not have control over its code. – GreenBear Nov 13 '12 at 03:25

0 Answers0