What event can be captured when an HTML hidden input value is set / changed

Viewed 12575

HI, In JavaScript when value is set to a hidden input control, which event is fired?

3 Answers

A value (aside from the initial value) can only be set on a hidden input by using scripting, and events do not generally fire in response to scripts.

It might trigger a Mutation event, but browser support for them is not all that widespread yet.

In general, if you want to do something when you script changes the value of a hidden input — make the script do the other thing at the same time.

I'm guessing that 'onchange' would fire.

Related