Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
08-02-2004, 02:47 PM #1
- Join Date
- Aug 2004
- Thanked 0 Times in 0 Posts
How to reset event handler for an inline frame (iframe) for IE
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!!!!
Last edited by tinaa; 08-02-2004 at 02:49 PM.