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 respond_with do |format| format.js end end
Route:
get "welcome/update"
update.js.erb:
$('#wrapper2').html("<%= escape_javascript render(:file => 'c.html.erb') %>");
Would appreciate any help I could get! This is the fourth forum I'm trying my luck in and hopefully the last! I'm about to lose it..
Thank you.
/Peter


Sign In
Create Account

Back to top









