What's the issue, exactly? Also, you'll get more help if you fit an example of your problem in a jsFiddle.net
Sean McArthur On Nov 27, 2010 11:03 AM, "Dailce" <[email protected]> wrote: > Hoping someone can help me, in my class I have the following code. I > been looking around and can't figure out how to rewrite the > bindWithEvent. > > ================================ > XHRify: function () { > var a = $$(".addtocart_form"); > if (!a.length) return MyCart; > a.each(function (b) { > b.addEvent("submit", MyCart.add.bindWithEvent(b, true)) > }) > }, > add: function (a) { > (new Event(a)).stop(); > var b = this.getProperty("title"); > this.set("send", { > url: this.getProperty("action"), > data: $(this), > onComplete: function (f) { > MyCart.update(f) > }, > onRequest: function () { > MyCart.roarit.alert("<h3>Added to your cart:</h3><p>" + > b + "</p>") > } > }).send() > }, > > ================================
