We help IT Professionals succeed at work.

Change Keyboard Language on focus to a textfield in HTML

rohitarj asked
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).
Watch Question

I don't think you can change it using javascript. Options would be using java, there is more info here:

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 !!!