I hope this helps
>
> Yes, you can do this in your .rjs.js file
> page.replace_html('id_to_replace', :partial => "task_node", :object
> => @task)
>
> I hope this helps
>
The disadvantage being of course that a large blob of html is encoded
as js and then decoded on the other side.
Why not just scrap the respond_to stuff and have your action be
def search
@project_people
=ProjectPerson.find_person_by_name_fragment(params[:q], params[:p])
render(:partial => 'project_people', :locals => {:pp
=>@project_people })
end
which has worked fine for me in the past.
Fred
>
> @Fred: I've done both rendering the partial for a 'replace_html' and
> rendered the html and used the :update parameter on the client side.
> There does not seem to be much difference in performance. The :update
> approach, though, probably makes more sense if you are updating only
> one region of the page (as here).
>
I've done both too. It's really only for large amounts of html that it
makes a difference (and it's not something I'd worry about unless it
became a problem). The performance problems were actually mostly
serverside, doing all the escaping on a very long javascript string.
Fred