Hi
I m using below code to show the confirmation message at the time of unloading of page, but its not working. please help me.
isc.Page.setEvent("unload", function () {
unloadPage();
});
function unloadPage() {
if(LocationList.hasChanges())
{ isc.confirm("You have unsaved data in the page. Do you want to save before leaving?", null,
{targetGrid:LocationList,
buttons:[isc.Dialog.YES, isc.Dialog.NO, isc.Dialog.CANCEL ],
yesClick : function () {
this.hide();
saveLocationList(); closePage('LocationForm', '<s:property value='closeAuthUrl'/>'); }
noClick : function () {
this.hide();
this.targetGrid.cancelEditing();
closePage('LocationForm', '<s:property value='closeAuthUrl'/>'); },
cancelClick : function () {
this.hide();
}
}
);
}