We help IT Professionals succeed at work.

Change Keyboard Language on focus to a textfield in HTML

rohitarj
rohitarj asked
on
I've two text fields in a form.  One field is English text field and other one is Dari text field.

User is able to input in Dari by changing the keyboard language by pressing Alt+Shift.

Now, we need to automate this.

On focus of each field, we should automatically switch the keyboard's language to corresponding text field's language.

Is there any way of doing this in JavaScript or in Java (will use applets to change the language).
Comment
Watch Question

Commented:
I don't think you can change it using javascript. Options would be using java, there is more info here:
http://peymanp.blogspot.com/2008/02/change-keyboard-layout.html

Another option is an onscreen keyboard using javascript but I have a feeling that's not what you want.
"Now, we need to automate this. "

Can't do it.  The keyboard language is reserved as a USER choice, NOT a server - browser choice -- otherwise, a web page could create mayhem for users !!!