Link to home
Start Free TrialLog in
Avatar of noijet
noijet

asked on

Simulate onbeforeunload behavior on Netscape...

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?
Avatar of VincentPuglia
VincentPuglia

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

2) nope; that button is untouchable

Vinny

Avatar of noijet

ASKER

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.
noijet:
  even in IE, the onUnload & onbeforeUnload will occasionally miss the closing door :)

Vinny
Avatar of Asta Cu
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
ASKER CERTIFIED SOLUTION
Avatar of SpazMODic
SpazMODic

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial