On Mar 4, 4:14 pm, Matt Zagrabelny <mzagr...@d.umn.edu> wrote:
> Greetings,
>
> I am trying to observe a <select> element's value changing when its
> value changes programmatically. The observation works when a human
> changes the select's value, but not when the javascript changes it.
>
> I know that I could add some more logic to the button push, but would
> like to avoid that if possible and simply register the observing
> conditions for the select.
>
The definition of 'onChange' is "The onchange event occurs when a
control loses the input focus and its value has been modified since
gaining focus." [1]
Simply changing the value should not fire the event (though I'm not
sure all browsers respect this). I don't think that there is an event
which will reliably fire in this case - you need to do it another
way.
Colin
[1] http://www.w3.org/TR/html401/interact/scripts.html#adef-onchange
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---