|
Posted by Captain Paralytic on 10/23/07 12:57
On 22 Oct, 20:48, The Natural Philosopher <a...@b.c> wrote:
> Fester Bestertester wrote:
> > Greetings,
>
> > I'm an occasional php/mysql dabbler.
>
> > I have a basic data form with a submit button. Unfortunately, it's still
> > possible for the user to enter data changes and close the window,
> > without clicking the submit button, thus losing the data.
>
> > Can someone point me to a generic example of some code that will trap
> > and handle this error?
>
> Only way is via javascript.
>
> Something like "onunload submit".
Some sites (Google Groups and the BBC Radio Player are examples), will
pop up a javasript cofirmation dialogue if you try to leave the page
having already typed information in (in thecase of Google Groups), or
have selected a radio programme to listen to (in he case of the BBC
Radio Player).
[Back to original message]
|