link_to_remote 'this'

You should be able to do this:

      {:update => {:success => "div1", :failure => "div2"},
      :url => {:action => :some_action, :id => id},
      :id => id,
      :before => "'spinner')",
      :complete => "Element.hide('spinner'); some_function('#

Isn't that just going to pass in the value of the variable 'id'?

'this' actually references an object in the DOM and thats what I need
from the function_to_remote so I can then manipulate it and other
objects in relation to its position within the DOM.


Hey Ben,

So when I put my code snippet in my app, this is the rendered html:

<% id = "user_#{}" %>
<%= link_to_remote(@user.login,
        :update => {:success => "div1", :failure => "div2"},
        :url => {:action => :some_action, :id => :some_id},
        :before => "'spinner')", :complete =>
"Element.hide('spinner'); some_function('#{id}')",
        :html => {:id => id})

<a onclick="'spinner'); new Ajax.Updater
({success:'div1',failure:'div2'}, '/content/some_action/some_id',
{asynchronous:true, evalScripts:true, onComplete:function(request)
{Element.hide('spinner'); some_function('user_1006137')}}); return
false;" id="user_1006137" href="#"></a>

Is this what you are looking for?