text input onChange not firing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ms

    text input onChange not firing

    I have come across a problem where if a user enters the same text into
    a text input after the value has been programmaticall y changed, the
    onChange event does not fire for the second change.

    The following code demonstrates this:

    <html>
    <body>
    <input type=text value='yyy' onchange="this. value='xxx'"></input>
    <input type=text value='2'></input>
    </body>
    </html>


    - Change the value of the first text box to (eg) 'aaa', and tab away.
    'aaa' will change to 'xxx'.
    - Tab back to the first text box, and again enter 'aaa'. Tab away and
    the text stays as 'aaa'. The onChange event does not fire. This has
    also been confirmed using .net studio to break into similar code.

    Is this a known bug, and is there a work-around for it?

    Thanks

    MS
  • Fred Oz

    #2
    Re: text input onChange not firing

    ms wrote:[color=blue]
    > I have come across a problem where if a user enters the same text into
    > a text input after the value has been programmaticall y changed, the
    > onChange event does not fire for the second change.[/color]

    Which browser? Worked every time for me in Safari 1.0.3, Firefox 1.0
    and IE 5.2 on Mac.

    Perhaps you mean some version of IE on some version of Windows?

    [...][color=blue]
    > Is this a known bug, and is there a work-around for it?
    >[/color]

    Use a real browser? ;-)

    --
    Fred

    Comment

    • msmsmsms782@hotmail.com

      #3
      Re: text input onChange not firing


      Fred Oz wrote:[color=blue]
      > ms wrote:[color=green]
      > > I have come across a problem where if a user enters the same text[/color][/color]
      into[color=blue][color=green]
      > > a text input after the value has been programmaticall y changed, the
      > > onChange event does not fire for the second change.[/color]
      >
      > Which browser? Worked every time for me in Safari 1.0.3, Firefox[/color]
      1.0[color=blue]
      > and IE 5.2 on Mac.
      >
      > Perhaps you mean some version of IE on some version of Windows?
      >
      > [...][color=green]
      > > Is this a known bug, and is there a work-around for it?
      > >[/color]
      >
      > Use a real browser? ;-)
      >
      > --
      > Fred[/color]

      Comment

      • msmsmsms782@hotmail.com

        #4
        Re: text input onChange not firing

        IE 6 on XP Pro SP1

        Comment

        • RobB

          #5
          Re: text input onChange not firing



          Comment

          Working...