function SaveOrCancel() { document.getElementById('<%=hdnBack.ClientID %>').value = ""; if (confirm("If you leave this screen you may lose any unsaved data") == true) { document.getElementById('<%=hdnBack.ClientID %>').value = "SAVE"; return true; } else { document.getElementById('<%=hdnBack.ClientID %>').value = "BACK"; return true; } }
window.onbeforeunload = SaveOrCancel;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)