Hi!
I've been struggling with a ajax/jquery html fraction update for a
couple of days now, can't seem to get my head around it.
I can't get my update.js.erb file to run, this is how my relevant files
look like:
____________________
The view:
<div id="menuwrapper">
<div class="tabArea">
<%= link_to 'Link', {:action => 'update', :controller =>
'welcome'},{:class=>"tab",:remote=>true} %>
</div>
</div>
<div id="wrapper2">
<!-- Where I want the html fragment-->
</div>

____________________
Welcome_controller:
def update
end

____________________
Route:
get "welcome/update"

____________________
update.js.erb:
$('#wrapper2').html("<%= escape_javascript render(:file => 'c.html.erb')
%>");


Would appreciate any help I could get! Thank you.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 5, '12 at 9:08p
activeJan 5, '12 at 9:08p
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Peter Klein: 1 post

People

Translate

site design / logo © 2021 Grokbase