<script language="javascript" type="text/javascript">
function EmptyText() {
if (document.getElementById("txtStaffNo").value == "") {
alert("Please provide Staff ID");
document.getElementById("txtStaffNo").focus();
return false;
}
}
</script>
Usgae:
<asp:Button ID="btnOk" runat="server" Text="OK" OnClientClick="return EmptyText();"/>
function EmptyText() {
if (document.getElementById("txtStaffNo").value == "") {
alert("Please provide Staff ID");
document.getElementById("txtStaffNo").focus();
return false;
}
}
</script>
Usgae:
<asp:Button ID="btnOk" runat="server" Text="OK" OnClientClick="return EmptyText();"/>
No comments:
Post a Comment