Ruby Forum Rails Spinoffs (closed, excessive spam) > Prototype 1.6 and Lowpro 0.5

Posted by Choppsta (Guest)
on 08.11.2007 13:05
(Received via mailing list)
If you're using Lowpro 0.5 from the trunk, you'll need to append this
to fix the broken Event.onReady method:

Object.extend(Event, {
  onReady : function(f) {
    document.observe('dom:loaded', f);
  }
});

Basically "contentloaded" changed to "dom:loaded" between rc0 and rc1.
Just spent all morning working this out, hopefully it will save
someone else some time!
Posted by Loren Johnson (lorenjohnson)
on 12.11.2007 04:27
(Received via mailing list)
OMG! This saved my day, almost. There is still some hair on my head
after pulling at it for the last 2 non-billable hours. Jeez!

This is going to be an issue for ANYONE using the current 0.5 release
of Lowpro.js with Prototype.js 1.6 with the intention of using D.
Webb's brilliant Behavior stuff. Hopefully other poor soles will get
around to checking here before getting too far.

I'm sure Dan lurks here but did you--Choppsta-- already send him some
notice of this bug?

Again, thanks a million!

Loren
Posted by Peter Smith (elux)
on 12.11.2007 16:33
Hey guys,

This is something I've been struggling for weeks as well. I still cannot 
get Remote.Link behavior to work even after amending the above code. 
It's a real shame because lowpro is a perfect implementation for http 
remoting.

Maybe I'm doing something wrong, but from my understanding its as simple 
as including the prototype, lowpro, remote and application js files (in 
that order).

In application I have:

Event.addBehavior({ "div.pagination a" : Remote.Link });

Perhaps I should have onReady? or some other event?

Regards,

Peter