Category Archives: RJS templates

Agnostic Unobtrusive JavaScript

A few weeks ago I wrote about Unobtrusive JavaScript using the Prototype versus JQuery stacks. In that post I came down on the side of the JQuery stack. Something I didn’t analyze at the time, was: is it possible to … Continue reading

Posted in AJAX, RJS templates, Ruby on Rails | 4 Comments

UJS; RJS versus POJS; Prototype Stack versus JQuery Stack

I am accustomed to using Unobtrusive JavaScript (UJS) in my apps. UJS dynamically adds event handlers to the DOM. These event handers implement behaviors via DOM manipulations and XMLHttpRequests (XHR’s). This approach is in contrast to the historical approach of … Continue reading

Posted in AJAX, RJS templates, Ruby on Rails, script.aculo.us | 4 Comments

ID Proliferation Eradication Technique #1: Leverage page.select with page.insert

update 3/29/2009 8:34 AM: In November, 2007 Brad Wilson pointed out an even cleaner fix. Rather than relying on page.select you can just use page.literal to inject (literal) JavaScript code right where you want it. So recasting my example using … Continue reading

Posted in AJAX, CSS, RJS templates, Ruby on Rails | 1 Comment

Foolproof AJAX Progress Indicator

Bruce Williams is right on in Avoiding AJAX Faux Pas where he lists four inviolable conditions your AJAX code must meet. The first two conditions address the need to show (then hide) a visual progress indicator to let the user … Continue reading

Posted in AJAX, RJS templates, Ruby on Rails, script.aculo.us | 2 Comments

Tell TextMate About Your RJS Templates

As explanations go, it doesn’t get much more straightforward than Cody Fauser’s excellent post on Rails RJS Templates. When you try it out though, you may notice that TextMate doesn’t know that RJS templates which by convention have an “.rjs” … Continue reading

Posted in AJAX, RJS templates, Ruby on Rails, TextMate | 3 Comments