Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > how to detect change in input text field initiated by mouse?

Reply
Thread Tools

how to detect change in input text field initiated by mouse?

 
 
jd
Guest
Posts: n/a
 
      12-10-2005
I want to be able to detect all changes to an html input text field. I
can catch keyboard events but I can't figure out what event gets
triggered if the text was inserted in some other way -- for example,
via a right click and paste or via autocomplete.

Thanks...

-- jeff

 
Reply With Quote
 
 
 
 
Csaba Gabor
Guest
Posts: n/a
 
      12-10-2005
jd wrote:
> I want to be able to detect all changes to an html input text field. I
> can catch keyboard events but I can't figure out what event gets
> triggered if the text was inserted in some other way -- for example,
> via a right click and paste or via autocomplete.


You might try:
onpropertychange for IE, and
oninput for FF

Csaba Gabor from Vienna

 
Reply With Quote
 
 
 
 
jd
Guest
Posts: n/a
 
      12-11-2005
I will give that a try. Thanks so much!!

-- jeff

 
Reply With Quote
 
jd
Guest
Posts: n/a
 
      12-12-2005
Followup: the suggested solution works. However, there is a bug in
Firefox (1.0.7?) that prevents the myObj.oninput property from being
set directly. The workaround is to use addEventListener:

if( myObj.addEventListener )
myObj.addEventListener("input", myFunc, true);

(Bugzilla Bug# 195696)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Sound Javascript 2 09-28-2006 02:43 PM
detect text properties modify field bscofield Javascript 0 05-05-2004 07:29 PM
PIX VPN tunnels - only works when traffic initiated from one side ? Brian Ipsen Cisco 10 02-25-2004 08:26 AM



Advertisments