Re: capture 'Paste' event in text-area



RJ schreef:
The scenario is.... there is a text-area that is used as chatbox where
user enters their text msgs for chatting ..now it has a fixed width
but the height increases according to the content.... now the problem
that i am facing is whenver i do a cntrl+v on to the textarea , the
height of the textarea does not increase according to the contents.
I tried capturing the cntrl key event using "event.ctrlKey" on
"onkeypress" event, but i works only for FF and fails in IE and
chrome.

Is there any way by which i can capture 'Paste' event......

Any help wld be highly appreciated.

Thanks,
RJ

Hi,

Have a look here:
http://www.quirksmode.org/dom/w3c_events.html#keyprops

Please note the listed keydown and keyup. keypress is NOT listed.

Good luck.

Regards,
Erwin Moller


--
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
.



Relevant Pages

  • Re: capture Paste event in text-area
    ... Please note the listed keydown and keyup. ... Since the OP had troubles with support in different browser for the keypress this seems like a good place to start reading. ... "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. ...
    (comp.lang.javascript)
  • Re: capture Paste event in text-area
    ... I tried capturing the cntrl key event using "event.ctrlKey" on ... Please note the listed keydown and keyup. ... properties *Key properties are not available during a keypress event, ...
    (comp.lang.javascript)
  • Re: capture Paste event in text-area
    ... user enters their text msgs for chatting ..now it has a fixed width ... height of the textarea does not increase according to the contents. ... I tried capturing the cntrl key event using "event.ctrlKey" on ...
    (comp.lang.javascript)
  • capture Paste event in text-area
    ... user enters their text msgs for chatting ..now it has a fixed width ... height of the textarea does not increase according to the contents. ... I tried capturing the cntrl key event using "event.ctrlKey" on ...
    (comp.lang.javascript)