Forum: Ruby on Rails Re: Dynamic selects won't fire events in some cases

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
E1f43bafda26307a050d11902752b2a6?d=identicon&s=25 Ball, Donald A Jr (Library) (Guest)
on 2007-02-01 00:10
(Received via mailing list)
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
B5259d7e4a3095ef961469d132880b94?d=identicon&s=25 Stephen Gerstacker (Guest)
on 2007-02-01 15:52
(Received via mailing list)
Ah, I didn't realize Prototype cached the last value.  I uncommented the
check (lines 2138 & 2141) and it works great.  Thanks.

Stephen Gerstacker
This topic is locked and can not be replied to.