473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Regarding php!

Hi,

I wana ask how do I implement the code for Caps lock in php...forexample: if I wana login and capslock is On, whenever I type my login the msg or alert msg should prompt that capslock is On.so when I press caps lock again to make it caps lock off, then program should allow me to enter login name..

Thx!
Jan 17 '10 #1
2 2004
dgreenhouse
250 Expert 100+
If the visitor can't see that they have the 'caps lock' on then they're probably not the kind of visitor you want! :-)

Seriously, as far as I know you can't detect the "caps lock" state in php. I'm not even sure if you can do "caps lock" detection using php's in a command line based app - I've never bothered to try and discover. On the other hand, you can do it in JavaScript.

Here's a link I found showing it implemented in javascript:
http://www.codeproject.com/KB/script...Caps_Lock.aspx
Jan 18 '10 #2
Markus
6,050 Expert 4TB
Hm, I believe that JS only checks that the shift key is pressed.

Anyway, with PHP being use typically as a server-side processor, for you to be aware of whether the caps-lock key is pressed, well, you'd have to pass that information to the server which defeats the point of PHP detecting it (not to mention you'd need to refresh the page / make an ajax call).

However, if you were doing this as a desktop application with PHP as the driving-force behind it, you could write an extension to find the caps-lock-key's state. I may have a look into doing that now.

Mark.
Jan 18 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Francis Lavoie | last post by:
Hello I have some questions regarding webframework, I must say that I quite lost and these questions are basicly to help me understand the way it work. I have some knowledge with PHP and JSP....
1
by: Mosas | last post by:
Dear All, Php has exec function to run system commands and this function return last line of system command result. But in Python I can see only os.system() function to run system command but it...
0
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils...
0
by: praba kar | last post by:
Dear All, In Php the following headers base we can clean the cache in the url "header('Cache-Control: no-store, no-cache, must-revalidate'); " I want to know Php equivalent headers in...
4
by: Phil Latio | last post by:
Below I have some code and below that a template file which I want to use to display the message lines. I just get a blank page so are the functions "getMessageLine1" and "getMessageLine2"...
5
by: dannynnad | last post by:
Hi, SuperAdministrator when trying to edit the frontend content the following error is comingup: "You are not authorized to view this resource." I checked from the backend whether the...
7
by: rahulragav | last post by:
Hi php-xml masters there ,warm greetings from this budding php guy..I'm new to this..and now caught up with a problem.. THE FOLLOWING is my code to extract data from a php class "simple.php" ...
4
hsriat
by: hsriat | last post by:
Got an issue regarding this... As said above (same as what php.net says), if we use mysql_pconnect(), it doesn't create more connections, if the connection parameters are same as the existing...
1
by: Matthew Baker | last post by:
Greetings all I know there are a couple of threads on this topic already--I have read they both, but I need a little clarification on process. I currently have a static XHTML page that...
2
mikek12004
by: mikek12004 | last post by:
Trying to build a flash rotator which takes some swf from a db and rotates them. In the head I have <script type="text/javascript"> clock_ads(1); function clock_ads(i) { <?php...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.