button_to_function question

button_to_function 'Click me', remote_function(:url=>{:action =>
'foo', :controller => 'bar'}}

remote_function takes basically the same options as link_to_remote and
generates the javascript for an ajax call. You'll want to read about
rjs for the final step of your problem

Fred