luanne
02-22-2003, 06:01 AM
Hi,
I am trying to capture the onunload() event and my script looks something like this:
<script>
function unload() {
alert("unloading");
}
</script>
....
....
<body onunload="unload()">
...
...
This is the error I get in Netscape 7 :
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowInternal.alert]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/WINDOWS/DESKTOP/Briefcase/clock.html :: unload :: line 94" data: no]
But, the same works fine in IE, Mozilla 0.9 and Netscape 4.05
Could someone please help? I really need to capture the onunload event. have also tried onUnload() but still doesn't work.
Thanks
Luanne
I am trying to capture the onunload() event and my script looks something like this:
<script>
function unload() {
alert("unloading");
}
</script>
....
....
<body onunload="unload()">
...
...
This is the error I get in Netscape 7 :
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowInternal.alert]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/WINDOWS/DESKTOP/Briefcase/clock.html :: unload :: line 94" data: no]
But, the same works fine in IE, Mozilla 0.9 and Netscape 4.05
Could someone please help? I really need to capture the onunload event. have also tried onUnload() but still doesn't work.
Thanks
Luanne