I'm writing a test for html files. In my main dtml file, I added an inline frame, like this:
<iframe NAME="myiframe" ID="myiframe" SRC="/"></iframe>
document.getElementById('myiframe').contentWindow.window.onbeforeunload = SomeFunctionNameIDefined;
Strangely enough, no matter what I set it to be, the value of onbeforeunload is always null.
This actually works for Mozilla. And also, if I add "window.onbeforeunload = SomeFunctionNameIDefined" in the code of "myiframe" code ( not main dtml file ), it works fine as well.
So I wonder is there something wrong with the DOM??
Thanks A LOT!!!!