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

Dan Webb <d...@danwebb.net>

> 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 Webb
http://www.danwebb.net

aim: danwrong123
skype: danwrong