IE onunload no longer works when window closing!!?

J

jdlwright

Hi, well it appears (and please please correct me if I am wrong) that
since some IE patch (I am using 6.0.2800.1160 SP2) the browser no
longer calls the onunload handler when running outside of localhost
(but why??).


eg.
<html>
<script>
function mesg(){
alert("hello");
}
</script>
<body onunload="mesg()">
hello
</body>
</html>

if you put that on localhost, open it in IE and then close the browser
you should get the alert. However if you move it to some non localhost
server and repeat, there will be no alert.

This definately worked before (before some patch came along) - one
solution is to use onbeforeunload instead, but it is of course IE
only(?) :(

Anybody know why, or any different?

Thanks,
Jim
 
D

Dietmar Meier

if you put that on localhost, open it in IE and then close the browser
you should get the alert. However if you move it to some non
localhost server and repeat, there will be no alert.

Cannot confirm that here using a current MSIE 6.0.2900.2180 (SP2) and
http://www.innoline-systemtechnik.de/dhgm/onunload.html

The only change relating to onunload I find documented in MSDN is
that Window.open() is ignored onunload in MSIE 6 SP2.

ciao, dhgm
 
J

jdlwright

Thanks for replying - your page doesn't work for me either, I'm sure
it's not a setting local to me as it's been reported by a customer (on
several machines) aswell....

Maybe it was broken in v.2800. and fixed in v.2900 ?

Jim
 
R

RobG

Thanks for replying - your page doesn't work for me either, I'm sure
it's not a setting local to me as it's been reported by a customer (on
several machines) aswell....

Maybe it was broken in v.2800. and fixed in v.2900 ?

I tried Dietmar's link with IE 6.0.2800 on Win XP SP 1 and it
works fine, so that ain't it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top