Go to Google Groups Home    Low Pro
Re: Adding a delete confirmation

Jarkko Laine <jar...@jlaine.net>

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