PDA

View Full Version : Detecting change to input field



atom01
26 Oct 2007, 1:43 PM
Hi,

I try to detect change to an <input> element and act on that using the onchange event. But the event only fires if I edit the input field manually with keyboard. If I change the value of that input field programmatically with javascript, then the event won't fire.

is there anything that I do wrong?

Thanks

tryanDLS
26 Oct 2007, 1:49 PM
You'd have to call fireEvent yourself, or since you know you just made a change, call the change handler directly.

atom01
27 Oct 2007, 12:19 AM
Thanks for the suggestion though an automatically fired event will be much better.