Solved

Simulate onbeforeunload behavior on Netscape...

Posted on 2003-10-27
5
440 Views
Last Modified: 2008-02-01
Hi, I am trying to find a way to simulate the behavior of onbeforeunload function in Netscape.  I understand that Netscape does not support this function.  I have a form that has user information, and when the user attempts to close the window, a confirm("Do you want to save changes"); window pops up.  I can do this on IE using onbeforeunload, but on Netscape I cannot.  Does anyone know a workaround?  

Thank you, any comments are well appreciated.

Thanks,
noijet.
Is there a way I can place an onclick event around the whole area of the close window button ?  because the button always appears on top right most corner?
0
Comment
Question by:noijet
5 Comments
 
LVL 15

Expert Comment

by:VincentPuglia
ID: 9629368
1) the best you can do is:
<body onUnload='something'>

2) nope; that button is untouchable

Vinny

0
 

Author Comment

by:noijet
ID: 9630629
Thanks for your comment Vinny.  My code already has like your 1)  but the problem is that Netscape 7.02 seems to not understand javascript code (even alert("");) after a user presses the close button.  But I check this code on Netscape 7.1 and it works fine.

noijet.
0
 
LVL 15

Expert Comment

by:VincentPuglia
ID: 9630674
noijet:
  even in IE, the onUnload & onbeforeUnload will occasionally miss the closing door :)

Vinny
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 10397431
noijet,
No comment has been added lately (114 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Accept noijet's answer http:#0 and Refund

Please leave any comments here within 4 days.

-- Please DO NOT accept this comment as an answer ! --


Thanks,
astaec
EE Cleanup Volunteer
0
 

Accepted Solution

by:
SpazMODic earned 0 total points
ID: 10426407
PAQed, with points refunded (80)

SpazMODic
EE Moderator
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How many times have you been browsing the internet, with multiple tabs open, and closed the wrong one? Have you ever clicked 'Close all tabs' instead of 'Close current tab' ? Internet Explorer 8 now brings to you, what Firefox has had for a wh…
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question