Archive

Posts Tagged ‘javascript’

Event Delegation for Prototype

March 23rd, 2009

Today I’d like to present my own rendition of an Event Delegator class based on Prototype. Event Delegation can be used to improve performance and code simplicity by observing one parent element and triggering events on the children when applicable rather than observing each child element individually.

Read more…

Programming ,

Ajax.DoubleCombo update

November 11th, 2008

Due to a recent request about my Ajax.DoubleCombo class, I have updated it to support automatic updates trickling down when the server returns a “selected” value or the default value is non-void. In the process, I added some Prototype 1.6 custom events, namely doubleCombo:update and doubleCombo:clearSlaves which in turn added support for what I will call “branching”. That is, support for multiple slave selects at each level. I don’t know if anyone has a use for this but it is now supported…

Here is the page with the code, docs and demo: Ajax.DoubleCombo

Programming ,