<button id="Update_employee" runat="server" class="btn btn-green no-radius" onserverclick="Update_employee_ServerClick" onclick="return license_check();" clientidmode="Static" autopostback="true" causesvalidation="false">Update</button>
<script type="text/javascript"> function RefreshParent() { if (window.opener != null && !window.opener.closed) { window.opener.location.reload(); } } window.onbeforeunload = RefreshParent; function license_check() { debugger var emp_licen = document.getElementById("<%=emp_license.ClientID%>").value; var emp_desig = document.getElementById("<%=emp_desig.ClientID%>").value;
if (emp_desig === "Doctor") { if (emp_licen.startsWith("DHA-P-")) { if (emp_licen.length === 14) { console.log(emp_licen.length); if (isNaN(emp_licen.slice(6, 13))) { alert('enter the proper license no'); return false; } else { return true; } } else { alert('As per DHA, the correct format is DHA-P-12345678 (8 Digits)'); return false; } } else { alert("Please enter license with prefix DHA-P-12345678 (8 Digits)"); return false;
} } else { return true } }
</script> here the event not firing i have tried with so many buttons but not firing can u please tell me solution