Hi,
In my Rails application I have used jQuery instead of Prototype.
When I was using prototype I use,
render :update do |page|
page.replace_html :div_id, :partial => “partial_name”
end
How can i do this with jQuery?
Thanks in advance,
Srikanth J
Hi,
In my Rails application I have used jQuery instead of Prototype.
When I was using prototype I use,
render :update do |page|
page.replace_html :div_id, :partial => “partial_name”
end
How can i do this with jQuery?
Thanks in advance,
Srikanth J
use a js template. ie, if you are in the update action, create an
update.js.erb and write the js function there
update.js.erb
$(‘#div_id’).html(‘<%= escape_javascript render(:partial =>
‘partial_name’)%>’)
On Mon, Feb 21, 2011 at 2:08 PM, Srikanth J.
[email protected]wrote:
How can i do this with jQuery?
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
–
use a js template. ie, if you are in the update action, create an
update.js.erb and write the js function there
Thanks a lot… I will try this.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs