I got it. I needed to use a div with ID="update" not
class="update". DOH.
Thanks
On 4/27/06, Larry White <ljw1001@gmail.com> wrote:>
> I''m hopeful that this is something simple i''m missing,
but I''ve run out of
> 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 on
> 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
> some surrounding html.
> ------------------------------------------------------------------------
> <div class="update">
> <%= render :partial => ''tab_predecessor_list''
%>
> </div>
> -------------------------------------------------------------------------
>
> This is the partial "tab_predecessor_list"
> ---------------------------------------------------------------------
> <%= form_remote_tag(:update => "update",
> :url => {:action =>
''add_predecessor''})
> %>
>
> <span class="edit_label"><label
> for="selected_task">Predecessor:</label></span>
> <input type="text" name="selected_task" >
>
> <%= Time.now.to_s %>
>
> <%= 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 Ajax.Updater(''update'',
> ''/tasks/add_predecessor'', {asynchronous:true,
evalScripts:true, parameters:
> Form.serialize(this)}); return false;">
>
> <span class="edit_label"><label
for="selected_task">Predecessor:</label></span>
> <input type="text" name="selected_task" >
>
>
> Thu Apr 27 07:55:51 EDT 2006
>
> <input name="commit" type="submit"
value="Add" />
> </form>
>
> -------------------------
>
> I''m using firefox with Rails 1.0. Thank you much in advance for
your
> help.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060427/7e78ef70/attachment.html