Message from discussion
What is the "Remote" stuff in the source code?
Received: by 10.35.14.4 with SMTP id r4mr21705137pyi.2.1202226678865;
Tue, 05 Feb 2008 07:51:18 -0800 (PST)
Return-Path: <d...@danwebb.net>
Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.226])
by mx.google.com with ESMTP id z53si2281934pyg.1.2008.02.05.07.51.18;
Tue, 05 Feb 2008 07:51:18 -0800 (PST)
Received-SPF: neutral (google.com: 72.14.214.226 is neither permitted nor denied by best guess record for domain of d...@danwebb.net) client-ip=72.14.214.226;
Authentication-Results: mx.google.com; spf=neutral (google.com: 72.14.214.226 is neither permitted nor denied by best guess record for domain of d...@danwebb.net) smtp.mail=...@danwebb.net
Received: by hu-out-0506.google.com with SMTP id 32so3209386huf.19
for <low-pro@googlegroups.com>; Tue, 05 Feb 2008 07:51:16 -0800 (PST)
Received: by 10.150.146.14 with SMTP id t14mr3606314ybd.122.1202226676452;
Tue, 05 Feb 2008 07:51:16 -0800 (PST)
Received: by 10.150.181.7 with HTTP; Tue, 5 Feb 2008 07:51:16 -0800 (PST)
Message-ID: <5b3e279f0802050751p1f16ce34ybc671846ff22c0bc@mail.gmail.com>
Date: Tue, 5 Feb 2008 15:51:16 +0000
From: "Dan Webb" <d...@danwebb.net>
To: low-pro@googlegroups.com
Subject: Re: What is the "Remote" stuff in the source code?
In-Reply-To: <febf9272-337e-4ab9-acad-cc5a2ec65eb3@q39g2000hsf.googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <febf9272-337e-4ab9-acad-cc5a2ec65eb3@q39g2000hsf.googlegroups.com>
> 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