How to send parameters to rjs

Jonathan Dobbie wrote:

How do I pass variables into an rjs?

I'd like to do:

page.replace_html "frame_set_<>", :partial => 'list_frame_set'


<%= link_to_remote "Display Frame Sets", :url => {:action =>
:toggle_frame_set, :id => job} %>

is in the view and

  def toggle_frame_set
    @job = Job.find_by_id params[:id]

is in the controller.

@job is passed to the partial, and it works fine if I hard code in an id
in the rjs, I just need some way to pass the id to the javascript.

page.replace_html "frame_set_#{}", :partial => 'list_frame_set'

have you tried that? or #{@job} make sure it's in double quotation marks