Trouble with Lowpro and Prototype

If you use Lowpro’s extensions for Prototype, you might run into this issue with Internet Explorer 7 (if not 6).

I use LowPro for its nifty shortcuts to otherwise daunting syntax for adding behaviors and page-level events to a web page.  Conventions like Event.addBehavior and Event.

Recently, perhaps with the newest version of Prototype, I started encountering problems using the class name selector in Prototype ($$), and with Event.addBehavior.  In IE7, this manifested itself with “Object doe s not support this property or method” errors around those blocks.

Temporarily, I replaced $$ with $(“id”).select(“.class”), which solved the problems with $$.  Event.addBehavior seemed more quirky, and I really didn’t want to relinquish that nice little command.

Lo and behold, I found on the LowPro web site, a command to disable LowPro’s $$ method.  If you have similar problems with LowPro, insert this statement after your call to LowPro, and you’ll be able to use $$ and Event.addBehavior with wild abandon:

LowPro.optimize$$ = false;

Tags:

Leave a Reply