I've created a page, where a user can edit data. What I want here is basically a confirmation dialogue with 3 choices, when the page is unloaded and there is still unsaved data:
- yes - leave the page and save
- no - leave the page and don't save
- cancel - stay on the page and don't save
I know how I would go on about confirming page leaving and saving separately, but I don't really want to bug the user twice.
I'm not sure if this is possible at all, as it seems to be necessary to change the "do you want to leave"-dialogue of the browser. Is there a way around this? Any other solution is also welcome.