F
Frank Esser
Hallo,
I've got a project with about 10 pages. On each of them the user can do data
changes (mostly datagrid interactions; the datagrids are bound to datasets).
The user is able to jump to each page of my project without clicking on the
"save" button and he can also close the browser without saving.
My customer wants the user to be informed about loss of data. If any page is
left without saving data changes then on the same page a message should be
shown "Do you want to save data before leaving this page?" and there should
be two buttons "Yes"/"No" in a certain design (no javascript message box!).
So I have got big trouble with this problem.
First I implemented a javascript function that is called on each
"OnBeforeUnload" event of the HTML body. This function just checks for data
changes and if so then re-calls the same page again. So on server side I was
able to detect changes and put the request for saving to the page content.
But the "OnBeforeUnload" event is also fired on each server-roundtrip when
doing any datagrid operation such as selecting an item.
With the "OnBeforeUnload" event it is not possible to call a server function
directly, only client-side javascript is possible.
I am running out of ideas. Has anyone a tip for me to solve this general
problem?
Thanks a lot !!!
I've got a project with about 10 pages. On each of them the user can do data
changes (mostly datagrid interactions; the datagrids are bound to datasets).
The user is able to jump to each page of my project without clicking on the
"save" button and he can also close the browser without saving.
My customer wants the user to be informed about loss of data. If any page is
left without saving data changes then on the same page a message should be
shown "Do you want to save data before leaving this page?" and there should
be two buttons "Yes"/"No" in a certain design (no javascript message box!).
So I have got big trouble with this problem.
First I implemented a javascript function that is called on each
"OnBeforeUnload" event of the HTML body. This function just checks for data
changes and if so then re-calls the same page again. So on server side I was
able to detect changes and put the request for saving to the page content.
But the "OnBeforeUnload" event is also fired on each server-roundtrip when
doing any datagrid operation such as selecting an item.
With the "OnBeforeUnload" event it is not possible to call a server function
directly, only client-side javascript is possible.
I am running out of ideas. Has anyone a tip for me to solve this general
problem?
Thanks a lot !!!