HOW TO DISPLY MESSEGE WHEN CAPS LOCK IS ON IN LOGIN PAGE

IN ASPX PAGE  JAVA SCRIPT :
 

 
<script language="javascript" type="text/javascript">
function capLock(e){
 kc = e.keyCode?e.keyCode:e.which;
 sk = e.shiftKey?e.shiftKey:((kc == 16)?true:false);
 if(((kc >= 65 && kc <= 90) && !sk)||((kc >= 97 && kc <= 122) && sk))
  document.getElementById('divMayus').style.visibility = 'visible';
 else
  document.getElementById('divMayus').style.visibility = 'hidden';
 
  }
 
</script>
 
//THIS IS THE DIV THAT WILL DISPLAYED ON CAPS LOCK ON..
<div id="divMayus" style="visibility:hidden">
           <asp:Label ID="Label1" runat="server" Text="Caps Lock is On.!"></asp:Label>
</div>
 
//THIS IS THE TEXT BOX AT WHICH U WANT TO CALL JAVASCTIPT..
<asp:TextBox ID="txtPassword" runat="server"  TextMode="Password" onkeypress="capLock(event)">
</asp:TextBox>


//FOR ANIMATION WITH BALOON POPUP CONTROL USING AJAX

 <ajaxtoolkit:balloonpopupextender id="PopupControlExtender2" runat="server" 
targetcontrolid="txtPwd"
 balloonpopupcontrolid="txtPwd" position="BottomRight" balloonstyle="Cloud" balloonsize="Small"
customcssurl="CustomStyle/BalloonPopupOvalStyle.css" customclassname="oval" useshadow="true"
scrollbars="Auto" displayonmouseover="true" displayonfocus="false" displayonclick="true" />

Comments

Popular posts from this blog

Add Serial no in crystal report without coding

Working with Oracle's BLOB and Microsoft's C#

File operations in C# (.net)