Forum: Ruby on Rails Ajax response won't display

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Larry W. (Guest)
on 2006-04-27 16:04
(Received via mailing list)
I'm hopeful that this is something simple i'm missing, but I've run out
things to try.  It should work just like the example in Agile Web
Development with Rails (i think)

I send an ajax request using remote_form and it's processing correctly
the server and returning a new form, but it won't replace the original.
It's supposed to update a div with class="update".

Help would be REALLY appreciated.

This is my page (excluding layout that add the required javascript) and
surrounding html.
 <div class="update">
    <%= render :partial => 'tab_predecessor_list' %>
This is the partial "tab_predecessor_list"
<%= form_remote_tag(:update => "update",
                                  :url => {:action =>
'add_predecessor'}) %>

    <span class="edit_label"><label
    <input type="text" name="selected_task" >

    <%= %>

    <%= submit_tag "Add" %>
<%= end_form_tag %>
And this is the response I'm getting to the Ajax Request (from Firebug).
Note the timestamp. it doesn't update in my browser.

<form action="/tasks/add_predecessor" method="post" onsubmit="new
         '/tasks/add_predecessor', {asynchronous:true,
evalScripts:true, parameters:Form.serialize(this)}); return false;">

	<span class="edit_label"><label
	<input type="text" name="selected_task" >

	Thu Apr 27 07:55:51 EDT 2006

	<input name="commit" type="submit" value="Add" />


I'm using firefox with Rails 1.0.  Thank you much in advance for your
Larry W. (Guest)
on 2006-04-27 16:22
(Received via mailing list)
I got it.  I needed to use a div with ID="update" not class="update".
This topic is locked and can not be replied to.