[elinks-users] Javascript event support in eLinks?

Roger Alix-Gaudreau Rgaudreau at manh.com
Wed Jun 6 07:32:19 PDT 2007

Some further detail...


Rather than registering the onkeypress event with the document object, I
have also tried registering it as part of the body tag, and as part of
the text field.  So, for example:


            <body onkeypress="evalKey(event)" ...


            <input type="text" onkeypress="evalKey(event)"...


But, neither of these approaches work either, though everything works as
expected in Firefox (Mozilla).


Do I need to approach this in a different way in eLinks?  Is this a
problem with the onkeypress event in eLinks?  Should I register a bug,
and if so, what priority would its resolution have?


Thanks in advance for any help or advice,


Roger Alix-Gaudreau



From: elinks-users-bounces at linuxfromscratch.org
[mailto:elinks-users-bounces at linuxfromscratch.org] On Behalf Of Roger
Sent: Wednesday, June 06, 2007 7:30 AM
To: elinks-users at linuxfromscratch.org
Subject: [elinks-users] Javascript event support in eLinks?


Good morning,


I am running eLinks with the SpiderMonkey engine compiled in, and I am
having some trouble using the onkeypress event, when it's registered for
the document as a whole.  That is, I have a piece of script at the
bottom of the page that registers the onkeypress event for the document:




Earlier in the document is a script defining the evalKey function, which
takes the keyboard event and analyzes it, to determine if a certain key
was pressed and take some action:


     function evalKey(e)


        //do some analysis



This works just fine in Firefox/Mozilla, and I can trigger the function
in eLinks with an onclick event registered to a key, but it doesn't work
in eLinks with the onkeypress event registered to the document.  Is this
due to a limitation in eLinks's document support, or a problem in the
code supporting the onkeypress event, or a limitation in eLinks's
support of the event model?


My next step is to try registering the onkeypress event with the text
field, but that's less than ideal -- I'd like to be able to capture and
analyze the user's keystrokes whether the text field has focus or not.


Thanks in advance for any help or advice you can offer,


Roger Alix-Gaudreau




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/elinks-users/attachments/20070606/23f43285/attachment.html>

More information about the elinks-users mailing list