Can anyone help - on the edit screen I need to prompt the user if they try to exit without clicking the save button.
The save button validates the data and if ok submits the form calling another .asp page which writes the data to a sql database.
I have used the 'onbeforeunload' javascript event and that prompts the user - if they click cancel they are returned to the screen to save their work.
The problem is that when they click the save button the prompt also appears and they have to click ok before the data is saved (which will be really tedious).
I need to somehow capture this even and not fire the onbeforeunload event if the save button has been pressed - I have no idea how this can be achieved - can anyone suggest????
The save button validates the data and if ok submits the form calling another .asp page which writes the data to a sql database.
I have used the 'onbeforeunload' javascript event and that prompts the user - if they click cancel they are returned to the screen to save their work.
The problem is that when they click the save button the prompt also appears and they have to click ok before the data is saved (which will be really tedious).
I need to somehow capture this even and not fire the onbeforeunload event if the save button has been pressed - I have no idea how this can be achieved - can anyone suggest????