Displaying 1 result from an estimated 1 matches for "handle_calc".
Did you mean:
handle_calls
2006 Jun 02
1
prototype patch submissions
...hat are intended to be totalled, I will
set subtotal="true" inside those input elements. I can then assign an event
handler to all of these elements with one statement:
document.getElementsByAttribute(''subtotal'').each(function(obj) {
obj.onchange = handle_calc;
});
Seeing as any node can have multiple custom attributes defined, it is easy
to attach an arbitrary number of semantically named attributes which can be
iterated through as required. One huge advantage of this is that by DRYing
up your event handling code, you encourage moving past d...