Re: Dynamic selects won't fire events in some cases

I had a similar problem with dynamic lists of checkboxes. It turned out
to be a bug or misfeature in Prototype, actually. observe_field caches
the last value to which the user set the field, and inhibits the
observation event from firing unless the value was observed to change.
Unfortunately, the cache isn’t updated or invalidated when the value is
modified programatically. Fortunately, it’s fairly simple behavior to
change in Prototype. I gotta run now and can’t post the patch I found,
but will do so later unless someone beats me to it.

  • donald

Ah, I didn’t realize Prototype cached the last value. I uncommented the
check (lines 2138 & 2141) and it works great. Thanks.

Stephen G.