JS CODE:
HOW TO USE:
<script type="text/javascript"> window.blockConfirm = function (text, mozEvent, oWidth, oHeight, callerObj, oTitle) { var ev = mozEvent ? mozEvent : window.event; ev.cancelBubble = true; ev.returnValue = false; if (ev.stopPropagation) ev.stopPropagation(); if (ev.preventDefault) ev.preventDefault var callerObj = ev.srcElement ? ev.srcElement : ev.target; if (callerObj) { var callBackFn = function (arg) { if (arg) { callerObj["onclick"] = ""; if (callerObj.tagName == "A") { try { eval(callerObj.href) } catch (e) { } } else if (callerObj.click) { callerObj.click(); } } } radconfirm(text, callBackFn, oWidth, oHeight, callerObj, oTitle); } return false; } </script>
HOW TO USE:
<asp:Button ID="btnDelete" OnClientClick="return blockConfirm('<br/>Are you sure you want to delete this record?<br/> ', event, 340, 150, '', 'Delete confirm')" Text="Delete" runat="server" />