
I am using the below code but window.onBeforeUnload is not working with back button.. how can i apply the below code for the click event of back button?
window.onBeforeUnload = function () {
if (document.referrer.indexOf('Create') > 0 || document.referrer.indexOf('Edit') > 0) {
if (document.referrer.indexOf('/BatchProcessing/GasBottleBatch') > 0)
document.location = '/BatchProcessing/GasBottleBatch/Edit/' + getParameterByName('P_BatchId');
else if (document.referrer.indexOf('/BatchProcessing/BulkLpgBatch') > 0)
document.location = '/BatchProcessing/BulkLpgBatch/Edit/' + getParameterByName('P_BulkBatchId');
else
history.back();
} else {
history.back();
}
return false;
};
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.