I actually am really quite in love with Prototype. Mainly though I am in love with its class/object model and the $() function. I also use its AJAX library if I'm doing some AJAX... but quite a bit of the stuff I don't really use, but to me it is worth it just for the class/object model.
I've also fallen in love with Behavior as well, which allows a cleaner separation of your javascript from html code (you setup javascript actions from css like selector rules). For really small things, it might be too much, but for normal or larger things, trying to maintain intermingled javascript and HTML can become a real nightmare, especially if you've got the same "action" in many places and find you need to fix or change something about it.
For example, using bubblenut's example code, it becomes something like:
<span class="Lightbox" ptype="<?=$product_type?>" pcode="<?=$product_code?>">QuickView</span>
var myBehavior = {
// .... //
'.Lightbox' : function(element) {
element.onclick = function() {
if ((this.getAttribute('ptype') != null) &&
(this.getAttribute('pcode') != null)
) {
new QuickView.Lightbox(
this.getAttribute('ptype'),
this.getAttribute('pcode'),
event
);
}
};
},
// .... //
};
That is a little more code at first sight; however, if you've got these quick view links in more than a few places, then the benefit of pulling the javascript out of the html quickly becomes apparent. And it also becomes apparent when you realize you can change an element's behavior just by changing its class(es) and/or node location [much akin to how you can do the same for its style]. Though to get the best use of it, you pretty much have to create custom HTML attributes, which won't validate; however it is a tradeoff to get better & easier to maintain code.