Hi,
Stephen Lynch wrote:
> What is the best way to insure that an edit table fields are saved on an
> exit.
>
> For example, I have an edit panel on a page. I do not want to post back on
> every field, but if an end user goes to another page I want the save button
> clicked so that the records are saved to the backend database.
>
> Thanks
>
> Steve
Unfortunately, there is no 100% reliable way. The onunload event in the
body tag can be used for this, but you cannot be 100% sure that the
action will be executed when the user closes the browser, for example.
If it is vital to save the data to the server, then I recommend using
AJAX to send the field's content to the server on a regular basis, for
example every time that a key is pressed. If it is not vital, then you
must design your application keeping that limitation in mind.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
Private/Malaysia:
http://mypage.bluewin.ch/lbugnion
Support children in Calcutta:
http://www.calcutta-espoir.ch