Re: capture 'Paste' event in text-area
- From: RJ <johnrenosh@xxxxxxxxx>
- Date: Sun, 7 Dec 2008 22:45:31 -0800 (PST)
On Dec 5, 5:41 pm, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@xxxxxxxxxxxxxxxx> wrote:
David Mark schreef:
On Dec 5, 6:56 am, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@xxxxxxxxxxxxxxxx> wrote:
David Mark schreef:
On Dec 5, 4:11 am, Erwin MollerHi David,
<Since_humans_read_this_I_am_spammed_too_m...@xxxxxxxxxxxxxxxx> wrote:
RJ schreef:That site should not be treated as reference material. I consider it
The scenario is.... there is a text-area that is used as chatbox whereHi,
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
Have a look here:http://www.quirksmode.org/dom/w3c_events.html#keyprops
Please note the listed keydown and keyup. keypress is NOT listed.
harmful as the descriptions of the "quirks" are often confused (among
other things.)
That table gives a nice overview which browser supports which metakeys.
Allthough I never use quirksmode as a reference, its listings with
compatibilities are useful and pleasantly presented and easily understood.
Since the OP had troubles with support in different browser for the
keypress this seems like a good place to start reading.
Which website would you advise to look up this kind of information?
Depends on what kind you mean.
I mean the kind that says which browser(version) supports which metakey.
Quirksmode.org is okay for an overview
of (some) browser differences, just ignore the attempts at explanation.
I take your word for it their explanations are bad.
I possibly couldn't comment on that myself since I never used that site
for anything else than quick compatibility lookups. ;-)
But if you have some other resource that collects this kind of
information ('this kind' meaning: 'browser compatibility lists for a lot
of stuff an every day webdeveloper needs'), I'll be glad to hear where
to find it.
This quirksmode happens to be the only one I know of that has so much.
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
Very Thanks to all for ur replies...... but i haven't got solution to
my problem as to how to increase height of the text area when contents
are pasted into it.
Now the thing is "keypress" event yields result in FF, but not with IE
and others, for IE and rest , the option available is "onkeyup" and
"onkeydown", but then the corresponding function would be called twice
for "cntrl+v" and hence that option will also won't work..... and
regarding "onpaste" event , it is only applicable for IE. I am sure
der must be some way to achieve this task.....
Guys, if you can help....
Thanks,
RJ
.
- Follow-Ups:
- Re: capture 'Paste' event in text-area
- From: David Mark
- Re: capture 'Paste' event in text-area
- References:
- capture 'Paste' event in text-area
- From: RJ
- Re: capture 'Paste' event in text-area
- From: Erwin Moller
- Re: capture 'Paste' event in text-area
- From: David Mark
- Re: capture 'Paste' event in text-area
- From: Erwin Moller
- Re: capture 'Paste' event in text-area
- From: David Mark
- Re: capture 'Paste' event in text-area
- From: Erwin Moller
- capture 'Paste' event in text-area
- Prev by Date: Re: pls help with AJAX.. (JSP)
- Next by Date: Re: Eloquent JavaScript Book
- Previous by thread: Re: capture 'Paste' event in text-area
- Next by thread: Re: capture 'Paste' event in text-area
- Index(es):