"ewosch" <wo***************@siemens.comwrote in
news:11**********************@l75g2000hse.googlegr oups.com:
Hallo,
I have a form with russion description of input elements (using
utf-8),
to be typed in with a russion keyboard.
In the input elements should only latin-1 be possible.
Is there a way to to this (without keyboard switching to english or
german) ?
I tried
<input type="text" charset="ISO-8859-1" />
but this does't work.
thanks
ewosch
So, your user is typing on a Russian keyboard, and you want the textbox
to show Latin-1?
Well, the input element doesn't have a "charset" property, so that
doesn't work.
Easy way: Tell your user to switch the keyboard to English or German
while filling out the form. And trust that they follow this instruction!
Another way, using javascript
: Detect each keystroke, examine the
character, and ignore it if it isn't 0-255. Also, alert('You MUST use
English or German keyboard!');
Harder way for you, easier for the user, also using javascript
: Re-map
all the keys on the keyboard. Detect each keystroke, look up the Cyrilic
character for that key, find the English character for that key, add it
to the textbox. This has been done:
http://www.google.com/search?q=javascript+map+keyboard http://www.gar.no/gweb/gwebkbd.htm
Good luck!