473,397 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

IE onunload no longer works when window closing!!?

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

Jul 23 '05 #1
4 3645
jd*******@shaw.ca wrote:
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
Jul 23 '05 #2
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

Jul 23 '05 #3
jd*******@shaw.ca wrote:
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.

--
Rob
Jul 23 '05 #4
Thanks Rob, would other people please try Dietmar's link

http://www.innoline-systemtech*nik.d.../onunload.html

and post a message if you don't see an alert box when closing the
browser window.

I'm certain this is nothing specific to me, and I am sure many people
would need to know of the same issue.

Thanks,
Jim

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Julien | last post by:
Webbrowser no longer works in .Net I set up a class to retrieve HTMLDocument events Public WithEvents doc As HTMLDocument Private Function doc_oncontextmenu() As Boolean Handles...
102
by: Skybuck Flying | last post by:
Sometime ago on the comp.lang.c, I saw a teacher's post asking why C compilers produce so many error messages as soon as a closing bracket is missing. The response was simply because the compiler...
1
by: Handi | last post by:
hi. i want to store the current state before window close, how to write code when window closing ( before window close) ? Thanks
2
by: chris in grimsby | last post by:
MDIChild Window Closing event not raised when MDI Parent is in a class library! Intructions to recreate problem: 1. Create a ClassLibrary project 2. Add an MDIParent form and a form that will...
2
by: sylvain | last post by:
is there a simple way to detect a web window closing when the user hit the X of the browser ? I want to display a message to the user when he goes out of my web page. I try to detect it by using...
1
by: Docster2005 | last post by:
Hi folks, A DTS package we have run for years now no longer works. The specific part that is not working is a subquery in the SOURCE object of a transformation. The source is based on a...
18
by: dlesandrini | last post by:
Has anyone noticed that the Google Groups Advanced Search no longer works correctly? Is it something I'm doing or have others noticed the change? Used to be, if I put *access* in the Groups...
12
pshm
by: pshm | last post by:
how to handle window closing event in javascript??? window.onunload=function(){ if(window.event.clientY < 0 && window.event.clientY < -80){ alert('window close event triggered'); } }...
7
by: Michiel Rapati-Kekkonen | last post by:
Hi, I would like my record to be saved only when my own close button (with all it's checks) is used. I made the winodws close button disappear, but you still can close using the right mouse...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.