Go to Google Groups Home    Low Pro
Re: What is the "Remote" stuff in the source code?

timothytoe <timothy...@gmail.com>

Interesting. This should be the subject of a future blog post on your
site.

On Feb 5, 7:51 am, "Dan Webb" <d...@danwebb.net> wrote:

> > You have a bunch of form and ajax stuff at the bottom of the source
> > code for Low Pro jQuery. Hidden features or just plumbing?

> Those are two built in behaviors that turn links and forms into
> versions that send via Ajax.

> $('a').attach(Remote.Link, { type: 'GET', dataType: 'script' });

> for example...

> both of them work woth a load of sensible defaults taking the URL from
> the href or the action and the method from the method attribute.  The
> form automatically serializes the data from the form its attached to
> to send.

> On top of this, the Remote.Form behavior helps serialization by only
> sending the submit button that you pressed in the request.

> Cheers,

> --
> Dan Webbhttp://www.danwebb.net

> aim: danwrong123
> skype: danwrong