M
ms
I have come across a problem where if a user enters the same text into
a text input after the value has been programmatically 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
a text input after the value has been programmatically 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