January 30, 2013, 03:05 AM
ShankarConfirmation in Maintain
Hi,
I have a read/write grid in maintain. User can update values in few of the columns. Sometime what happens,user changes the values and forget to save it by clicking on 'SAVE' button. In such scenario, I want to put a confirmation when user moves away from the page that ' You have some unsaved data'. On clickng OK it will stay on same page else move to other page. How to achieve this in maintain? Please suggest.
Thanks in advance
January 30, 2013, 10:14 AM
ShankarIn continuation of above problem, On my Screen 'SAVE' button only get enabled when user makes any changes in Read/Write Grid else it is disabled. There is 'BACK' button through which user can leave the screen and navigates back.On clicking 'BACK' i am using self.winclose() to close the form.
I was thinking about handling the event 'BACK' in javascript function by using confirm() function. i.e, first i will check state of 'SAVE' button. If it is enabled(that means update is made), i will use confirm() function to ask for confirmation 'Please save data'. If user clicks OK, it will stay on same page else it will close the form to go back.
The problem is that i am not able to handle it in Javascript. Can anybody please help me with the code? That will be really great.
Thanks in advance.