Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to run javascript on jsp page for virtual keyboard?????
Posted
Comments
Prerak Patel 15-Apr-11 6:11am    
same as running javascript for html
Sandeep Mewara 15-Apr-11 6:54am    
Any effort? Further, try to be more specific next time.

1 solution

Here is an ad hoc approach in which I'm assuming that the page is being viewed on a device that has a touchscreen but no keyboard attached:

  1. Every textbox in you html must have an event handler for the onfocus event.
  2. You must include a div or some other suitable container which has the controls (buttons etc) that make up your virtual keyboard.
  3. Former keyboard container is usually hidden
  4. Upon receiving the onfocus event you memorize which textbox is currently active and start showing the container with the keyboard
  5. The keyboard buttons also have event handlers which register when a certain virtual key was pressed
  6. Execute the appropriate actions on the textbox which was memorized by our code in step 4
  7. Extra bonus: also memorize the content prior to editing so you can have an undo button on your virtual keyboard in case you messed up your editing.

Start with this and if you run into problems come back and ask more specifically!

Best Regards,

-MRB
 
Share this answer
 
v3
Comments
Espen Harlinn 15-Apr-11 8:15am    
Good outline, 5ed!
Manfred Rudolf Bihy 15-Apr-11 8:35am    
Thanks Espen!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900