What change on a textarea

A

Alexandre Flament

I would like to know what change on textarea :
- when user change content with keyboard
- when user drag/drop some text to textarea

By what change, I mean for example, this kind of event :
- at offset 153
- user add this text "azerty"

Is there a way to do it with ECMA ? or perhaps with specific extension
of mozilla or IE ?
 
E

Evertjan.

Alexandre Flament wrote on 30 jul 2003 in comp.lang.javascript:
I would like to know what change on textarea :
- when user change content with keyboard
- when user drag/drop some text to textarea

By what change, I mean for example, this kind of event :
- at offset 153
- user add this text "azerty"

with onchange= and this.value you can detect the contents and javascript
code can compare it with the earlier saved [in a variable] contents

....
onchange="compareit(this)"
....

<script>
function compareit(x){
alert(x.value)
if(x.oldvalue)alert(x.oldvalue)
x.oldvalue=x.value
}

to be debugged !
 

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
474,077
Messages
2,570,569
Members
47,205
Latest member
KelleM857

Latest Threads

Top