Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
96
rated 0 times [  99] [ 3]  / answers: 1 / hits: 110708  / 13 Years ago, fri, may 13, 2011, 12:00:00

SendKeys is method to sending keystroke to an application.

Can I do it in Javascript, to send keystroke in browser ?



REF :

http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx


More From » sendkeys

 Answers
39

If you would be able to send keystrokes on the OS Level, this would be a big security issue.
You could (for instance) install any kind of software on the client machine if you where able to send keystrokes to the needed install dialogs.



Yes, you could come up with an active-x control or some other tools to be installed on the client machine. But because of the security issues with such a tool, I wouldn't do it -- even in a controlled environment.



Most of the time, there is a way to achieve your needed functionality without breaching the security.



Update: If you want to jump to the next tabfield, you have to use the focus() method to set the focus to the next element. Unfortunately, you have to find the next element by yourself in javascript, but this should not be a big problem - you can keep an ordered list of all your elements in javascript.



btw: http://forums.devarticles.com/javascript-development-22/moving-to-next-tabindex-on-event-2382.html


[#92258] Wednesday, May 11, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
briza

Total Points: 259
Total Questions: 94
Total Answers: 101

Location: Reunion
Member since Mon, Dec 28, 2020
3 Years ago
;