473,383 Members | 1,821 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,383 software developers and data experts.

event.keyCode, where can I get a map for these?

I would like to know what keycode # pertains to what keycode . . .

This code allows a user to limit the entries in a form to only those
keycodes they would like, #s only for US zip codes, for example. What I
would like to know is what keycode #s pertain to what keycode. There should
be a list out there somewhere, no?
http://javascript.internet.com/forms...ss-script.html

--

Please contact me if you have any questions,

Patrick Gibbons
fn******@hotmail.com
Jul 20 '05 #1
1 4523
JRS: In article <ev**********************@newsread2.prod.itd.earth link.
net>, seen in news:comp.lang.javascript, Patrick Gibbons
<fn******@hotmail.com> posted at Sun, 27 Jul 2003 18:04:58 :-
I would like to know what keycode # pertains to what keycode . . .

This code allows a user to limit the entries in a form to only those
keycodes they would like, #s only for US zip codes, for example.
Most users, on being asked to enter a valid postal code, will enter a
valid postal code; or at least one which is grammatically sound.

I see little point in forcing them to download all the code which is
necessary to scrutinise the individual keystrokes, when it is easier to
validate the code on loss-of-focus or completion-of-data.

Completed postal codes can be checked, quite economically, by using a
well-chosen RegExp; a liberal check for world-wide codes, a rigorous
format check for Canadian ones, a choice for UK ones, etc.

Will
OK = /^[a-zA-Z0-9- ]{m,n}$/.test(PoCo)
or a little more, match all world postcodes, after whitespace
normalisation ? What are the proper m & n ?

Please contact me if you have any questions,


QHAH. FAQ 2.3, 2.4.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/JS/&c. FAQ items, acronyms
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Lachlan Hunt | last post by:
Hi, I've been looking up lots of documentation and trying to work out a cross-platform method of capturing a keyboard event and working out which key was pressed. From what I can find, there...
6
by: rich_poppleton | last post by:
Help.... I've got a textarea where people type in a description. However for certain reasons we need to stop them typing !$*^ . I have a solution this which works fine in IE: function...
4
by: Thomas Christensen | last post by:
I'm trying to figure out what key the user pressed using a Danish keyboard layout. charCodeAt returns the correct number, but event.keyCode returns a wrong number, when using one of the keys that...
3
by: Raul M. Colon | last post by:
Is possible to assign a click event to a button control in a Web form just pressing the return key? Something like windows forms where you can assign this action to a default control. For example,...
4
by: Tim | last post by:
Hi Guys, I want to know how to tell if the shift key is held down when another key is pressed. I am using the following code to make sure that only numbers, backspace and decimal are allowed...
8
by: Nathan Sokalski | last post by:
I add a JavaScript event handler to some of my Webcontrols using the Attributes.Add() method as follows: Dim jscode as String = "return (event.keyCode>=65&&event.keyCode<=90);"...
4
by: Nathan Sokalski | last post by:
I am writing a piece of code for an ASP.NET function that generates an onKeyPress JavaScript eventhandler that uses the event.keyCode / event.which properties. I have two situations that I would...
6
by: blaine | last post by:
Hello, I'm currently overriding function keys (F1 to F4) to perform other actions. In order to do this the default popup windows of Help (F1), Seach(F3) etc must be turned off. In FF it's easy...
33
by: buss123 | last post by:
Hi all, combo box script code was working in IE perfectly with all modes but OnChange event was not working in FireFox(editable mode, if we select valuese that combo box values r...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.