Navigation Menu

What's New?
Alphabetical Listing
Site Contents


Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Become a Partner

Internet.commerce

Be a Commerce Partner














Internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Developer Channel

FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

Great Sites

DocJavaScript.com
dhtml.com
The Freebie Directory
TheFreeSite.com

Browse Doc JS's Tips!


Hiermenus Central


Promotions

Free Announcements


Social Bookmark

General

If a user enters his password in a Web-based form with [Caps Lock] accidentally on, he can become frustrated because his password is not being accepted, and may assume the script is the source of the problem. This script will let the user know his [Caps Lock] is on and about the potential for error.


Password:

Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: checkCapLocks.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


User Comments

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum. Do not include more than two (2) lines of code in your comments. If you have suggestions or corrections, you can submit them to us.]

    
   
       
[optional]
 
[optional]

   

Comments feed Comment Feed RSS 2.0

4. From: Narasimhan
Nice idea
10/23/2008 00:21:31

Hi ,
The Main problem with ur script is checking only for the capitalized word not the caps lock button is pressed .

5. From: Lee (Admin)
10/31/2008 12:06:55

That's not a problem, that is the way it was designed to work. You can always adapt it to what you need.

6. From: Fabio Di Tommaso
there's an error
10/22/2008 08:43:33

Hi

I'm italian so my english is not the best but i hope u 'll understand me

Your code is cool but when i apply it in my website there's an error: 'Object Required'

- I followed your instructions:

- I pasted scipt tags on the <head> tag
I wrote onkeypress="checkcapslock(event)" on the textbox tag

can u help me?

7. From: Lee (Admin)
10/31/2008 12:47:36

Your question is beyond the scope of these comments. You will need to post it over on the JavaScript forum. Thanks!

3. From: Pabitra Bajracharya
06/12/2008 05:49:32

what about unicode characters???
The code doesnot check caps on for characters of language other than en-US

1. From: Paul Brown
Caps Lock Script doesn't work
02/26/2008 02:44:56

This script n your site works well, but when I follow your instructions and create the files needed (and correct the spelling errors in checkcapslock.js file names) it doesn't. Could someone let me know why, because I'd really like to use it!

Paul Brown

2. From: Lee (Admin)
06/26/2008 11:21:50

In order to better help you, you'll need to post your question over on the forums.


Do you write JavaScripts?
If you do, why not submit them to us?
We'll give you credit and a link back to your Web site.