The \"onchange\" event is triggered only when the USER enters some value. Why isn\'t possible to fire the event when I change the value automatically via Javascript ? Is the
The code of Crowder only gave me an TypeError (Not enough arguments to UIEvent.initUIEvent). Change it to this:
input.value = "Another example"; var event = document.createEvent("UIEvents"); event.initUIEvent("change", true, true, window, 1); input.dispatchEvent(event);
and it works.