You are at the archive for the AJAX Category:

SproutCore models

http://github.com/sproutit/sproutcore/wikis/sproutcore-s-modern-model-layer
http://github.com/sproutit/sproutcore/wikis/sproutcore-s-modern-model-layer-part-2
http://github.com/sproutit/sproutcore/wikis/sproutcore-s-modern-model-layer-part-3
Those links (if you haven't checked 'em out) provide some nice insight into how the SproutCore team is thinking about javascript models. It's an interesting pattern of separation.
Basically:
In a model you use MyModel.get('blah') and MyModel.set('blah') and then (it uses ruby helpers) in a view you do something like this:
PLAIN TEXT
RUBY:

<%= progress_view :progress_bar_id,
      [...]

Getting blur, focus and change (in ie) events to bubble using the Motionbox Event Handler

You might notice that blur, focus and change events do not necessarily bubble. At Motionbox we use the following hack to subscribe to all form fields at dom ready and then fire custom events so you maintain the same interface to events as everything else.
We do two things in the JS that won't work [...]

The Motionbox EventHandler in use

Sometimes you just have to like convenience. Using our EventHandler I was just able to write the following code:
PLAIN TEXT
JavaScript:

MOBX.HighlightTextField = (function() {
   
    var highlightText = function (evt) {
        var el = evt.element();
        el.focus();
        el.select();
    };
   
    MOBX.EventHandler.subscribe(".highlight_on_click", "click", [...]

Motionbox EventHandler gets some love.

Home page - JavaScript Bubbling Library (YUI-CMS) - YUI (Yahoo! User Interface) Extension for Event-Driven Applications
Motionbox EventHandler
For those who use propotype instead YUI, here is an implementation of the bubbling core routine for Propotype, I never tested it, but it's seen like a good implementation.
Very cool to see the link back. The YUI bubbling [...]

A photo gallery javascript (again)

I usually hate these things... but this one is cool: http://qgallery.quadrifolia.de/

An Open-Source Event Handler

Event delegation and bubbling seems to have become a little bit of a hot-topic lately. We've been using a custom-written prototype.js based library for a while here at Motionbox and after reading some articles on Ajaxian and others, we've decided to open-source the library.
As you know, the technique of listening to events high in the [...]