PDA

View Full Version : Send keypresses to browser page javascript



mtntrx
January 4th, 2007, 10:24 PM
I have written a webpage that is using javascript (onkeydown, onkeyup, and/or onkeypress) to interact with the page.

It works great with the keyboard, but when keys are sent with girder, nothing happens (well not nothing, the up down girder attpemts will scroll the page) but the keystrokes don't make it to javascript.

Really, I did search, but I can't figure this out.

The good part is that I have control over the javascript in the page, so any alternative can be considered.

Thanks

mtntrx
January 5th, 2007, 12:28 AM
Ok, further messing around shows that if I send characters through the girder keyboard plugin to a browser, javascript (onkeydown) is able to pick them up if I send them to the "foreground window only". If I try to specify the window they are not picked up by the javascript.

Any ideas, or am I stuck making sure the window is in the foreground first?