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

Discussion in 'Javascript' started by jd, Dec 10, 2005.

  1. jd

    jd Guest

    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
     
    jd, Dec 10, 2005
    #1
    1. Advertising

  2. jd

    Csaba Gabor Guest

    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
     
    Csaba Gabor, Dec 10, 2005
    #2
    1. Advertising

  3. jd

    jd Guest

    I will give that a try. Thanks so much!!

    -- jeff
     
    jd, Dec 11, 2005
    #3
  4. jd

    jd Guest

    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)
     
    jd, Dec 12, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan
    Replies:
    5
    Views:
    2,926
    bruce barker
    Dec 1, 2003
  2. Srinivasa Raghavan Sethuraman
    Replies:
    0
    Views:
    579
    Srinivasa Raghavan Sethuraman
    Jun 30, 2004
  3. Guest
    Replies:
    2
    Views:
    2,070
    Steven Cheng[MSFT]
    Aug 18, 2005
  4. Chris Smith
    Replies:
    4
    Views:
    676
  5. Stefan Mueller
    Replies:
    0
    Views:
    390
    Stefan Mueller
    Jan 28, 2006
Loading...

Share This Page