From: David D.K. <ddk...@ki...> - 2004-12-08 08:10:37
|
Note that this RFE now has a patch that provides a "framework" (in the loosest sense of the word) for an event object. It even tries to give you an MSIE event object when using an MSIE user agent. You'll have to add the keyCode field to it, though. [ 948889 ] Support for fourth-generation event model http://sourceforge.net/tracker/index.php? func=detail&aid=948889&group_id=47038&atid=448269 I highly recommend reading this article when implementing event handlers that use an 'event' object to make your JavaScript compatible across MSIE and Mozilla/Firefox (and Safari and Opera). Supporting Three Event Models at Once http://developer.apple.com/internet/webcontent/eventmodels.html Dave On Dec 7, 2004, at 12:37 PM, Brad Clarke wrote: > It looks like the only key-press support that currently exists is for > access keys. I > suppose you could hack together some javascript to simulate this using > HtmlPage.executeJavaScriptIfPossible(): > > <some code to make a window.event object since we don't seem to > support that yet > either> > window.event.keyCode = <yourFKey>; > HandleFnKeys(); > > > --- "Brehm, Robert P" <rob...@of...> wrote: > >> All, >> >> I am implementing function key support as follows: >> >> <body ... onKeyDown="HandleFnKeys()" ... > >> >> and the javascript is as follows: >> >> function HandleFnKeys() { >> var evt=window.event.keyCode; >> switch (evt) { >> case 112: //F1 >> HandleSubmit(); >> break; >> case 113: //F2 >> OpenExistingPO(); >> break; >> case 121: //F10 >> HandleChoose(); >> break; >> }//switch >> }//function >> >> I notice that the onKeyDown event by the documentation is not >> implemented. Is >> there any way around this to perform the function key support? >> >> Best Regards, >> >> Bob Brehm >> Software Engineer >> Xerox Corp. >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real >> users. >> Discover which products truly live up to the hype. Start reading now. >> http://productguide.itmanagersjournal.com/ >> _______________________________________________ >> Htmlunit-user mailing list >> Htm...@li... >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |