Forum: Ruby on Rails (kind of OT) Equivalent to onunload or onbeforeunload in Saf

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
jennyw (Guest)
on 2005-11-12 13:49
(Received via mailing list)
I realize this isn't specifically a Rails question, but I figure others
here will have encountered it. I have a client that wants form data to
be saved when leaving a page. This could include leaving a page by
following a link, closing a window, or pressing the back or forwards
buttons. So ... I do some research, and found this Web page:

which describes using onbeforeunload to show a confirmation (I'm doing a
form submit, so it seems like onunload would work, too). This works in
Firefox and IE. Safari, however, blithely ignores this.

I know a lot of Rails developers are Mac users so I was hoping someone
knows of a solution to this issue?

FYI, I tried Safari 2.02 on Tiger.


This topic is locked and can not be replied to.