Click here to Skip to main content
15,899,018 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
HOW TO DISPLY MESSEGE CAPS LOCK IS ON IN LOGIN PAGE ?
In my login page the passwords field has case sensitive.

Please help me.

Thanks in Advance.
Posted
Updated 27-Jun-11 0:56am
v2
Comments
aayu 17-Sep-10 5:34am    
i can't able to get your second question???

But then you here is one code for case sensitive

foreach (array as key => $value) {
  if (key == 'uid' || key == 'status') {
   $query[] = "key = %d";
    params[] = value;
  }
  else if (key == 'pass') {
    query[] = "pass = '%s'";
    params[] = md5(value);
  }
  else {
    query[]= "LOWER($key) = LOWER('%s')";
    params[] = value;
  }
}

well i am also not sure with this code but yes with the help of if else you can get what you want...:rose::thumbsup:
 
Share this answer
 
v2
Comments
rpkaran 17-Sep-10 6:02am    
Reason for my vote of 5
Automatic vote of 5 for accepting answer.
[no name] 27-Jun-11 6:55am    
Edited for Code Block.
[no name] 27-Jun-11 6:56am    
My 5 too.
XML
Hi..
        You can use this code.

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>
This will display message for caps lock...
 
Share this answer
 
Hi,

Please check following link:

http://javascript.internet.com/forms/check-cap-locks.html[^]


Please do let me know, if you have any doubt.

Please provide Vote if this would be helpful to you.

Thanks,
Imdadhusen
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900