How to catch onload event in one frame fired from another frame
<p>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.<br>
This code does not work, though no errors are produced either:</p>

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

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