Message from discussion
Adding a delete confirmation
Received: by 10.115.91.2 with SMTP id t2mr43968wal.20.1201249520618;
Fri, 25 Jan 2008 00:25:20 -0800 (PST)
Return-Path: <jarks...@gmail.com>
Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169])
by mx.google.com with ESMTP id k36si1019226waf.0.2008.01.25.00.25.19;
Fri, 25 Jan 2008 00:25:20 -0800 (PST)
Received-SPF: pass (google.com: domain of jarks...@gmail.com designates 66.249.92.169 as permitted sender) client-ip=66.249.92.169;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of jarks...@gmail.com designates 66.249.92.169 as permitted sender) smtp.mail=jarks...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by ug-out-1314.google.com with SMTP id 30so453999ugs.15
for <low-pro@googlegroups.com>; Fri, 25 Jan 2008 00:25:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender;
bh=GMAX8sEQtd96O/WG9xPPRqhiqeSmD4/uR20RgwS6hhw=;
b=ZU/wRhdBS8QB/TTcXgN8M6HXicPW8+vrJD1v8Mnj0Q4Lr4ZoxIC7sftMhdMA7tqmJQsyiVc4RPddvX4DI7c8Ty7EVAGKhNH4yyys03TlKnFEFSpQKEDFjKrd2ulZp5kX/lJIsCU/rcc3QIMNIk2lcBjoxweGK6B3e5FhmknXo8c=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender;
b=mP9RzzT7eefZdQemGMrkDxTxVl78u3LU2oQh/mcG2eFw/+CxHjDr+nqmE0mrlBXCi6ZUCEn+XtWORgVFojz9omDEUwz8Tuldf8TqEKSdZR+KMRc14U0mHl4qLRH3+rmRTkMdkyBR2843VhV+uPCsSl8yDsFLrwBIF99vsNiSqSE=
Received: by 10.67.115.15 with SMTP id s15mr3272179ugm.63.1201249519273;
Fri, 25 Jan 2008 00:25:19 -0800 (PST)
Return-Path: <jarks...@gmail.com>
Received: from Probutanol.lan ( [91.153.207.11])
by mx.google.com with ESMTPS id 19sm7095358ugl.13.2008.01.25.00.25.18
(version=TLSv1/SSLv3 cipher=OTHER);
Fri, 25 Jan 2008 00:25:18 -0800 (PST)
Message-Id: <8E511704-4426-49A8-8C34-4B1CF569E...@jlaine.net>
From: Jarkko Laine <jar...@jlaine.net>
To: low-pro@googlegroups.com
In-Reply-To: <58bb3c54-3fbf-4539-bdb2-575d605b1...@i12g2000prf.googlegroups.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v915)
Subject: Re: Adding a delete confirmation
Date: Fri, 25 Jan 2008 10:25:16 +0200
References: <8ced4378-7ea2-43f2-9ac8-05b4ad3ea...@x69g2000hsx.googlegroups.com> <f58d8dcb0801241734l66d81ad2t5db054dc198bb...@mail.gmail.com> <B8AC67E0-9EE3-4543-A8F3-E941CDB8B...@jlaine.net> <36189a9b-c116-48e2-bc48-a01bd2d24...@d70g2000hsb.googlegroups.com> <80968BCD-78C8-4F54-88AB-C1261FB83...@jlaine.net> <58bb3c54-3fbf-4539-bdb2-575d605b1...@i12g2000prf.googlegroups.com>
X-Mailer: Apple Mail (2.915)
Sender: Jarkko Laine <jarks...@gmail.com>
On 25.1.2008, at 9.20, KJoyner wrote:
>
> I have added the following that now works, except for the reload which
> does not appear to be working as I intended. For completeness, I have
> included my updated delete method.
>
> var AJ =
> {
> encode_authenticity_token:function( token )
> {
> return encodeURIComponent( $(token).value )
Can't answer to your reload question off the top of my head, but you
can replace $(token).value with $F(token) (see http://prototypejs.org/api/utility/dollar-f)
> document.body.select( 'input[ name = "authenticity_token" ]' )
> [ 0 ] )
This is also same as $$('input[name="authenticity_token']).first() (http://prototypejs.org/api/utility/dollar-dollar
). If you give the input field an id, it can be reduced to $
('authenticity_token').
--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi