Hi In controller suppose action is replace_this then create a file replace_this.rjs in the same folder Now in action write render :action => 'replace_this.rjs"
And open replace_this.rjs page[:div1].replace_html :partial=>"partial_here"}
Above you can use :inline, etc instead of :partial Look http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html
Sijo