trap keystrokes

D

David McDivitt

Another fellow here must modify an application. On the web page, pressing
the enter key causes the form to submit. What users want is to remove enter
key functionality from within a textarea and cause the enter key to submit
the form, AND cause the F6 key to do what the enter key used to do inside
the text area. The idea I suggested is to trap keystrokes in the text area,
If the enter key is pressed, do the submit method. If F6 is pressed, disable
the enter key test then emulate an enter key by creating an event object.
The textarea should then insert a new line as if the enter key was pressed.
would that be the right approach and has anyone done something similar.
Thanks
 
N

Neredbojias

To further the education of mankind, David McDivitt
Another fellow here must modify an application. On the web page,
pressing the enter key causes the form to submit. What users want is
to remove enter key functionality from within a textarea and cause the
enter key to submit the form, AND cause the F6 key to do what the
enter key used to do inside the text area. The idea I suggested is to
trap keystrokes in the text area, If the enter key is pressed, do the
submit method. If F6 is pressed, disable the enter key test then
emulate an enter key by creating an event object. The textarea should
then insert a new line as if the enter key was pressed. would that be
the right approach and has anyone done something similar. Thanks

If it _can_ be done (-I think it can,) comp.lang.javascript would be the
best place to find out how.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top