Forum: Ruby on Rails form_remote_tag and tables

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ed1f46ae148f2abaa555bba2ab051117?d=identicon&s=25 Oscar Bonilla (Guest)
on 2006-02-08 06:50
(Received via mailing list)
Hi,

I was following the tutorial at http://www.onlamp.com/pub/a/onlamp/
2005/06/09/rails_ajax.html and I've stumbled on a problem. Instead of
using a <ul> tag like the tutorial for the list, I tried using a
<table> tag. The problem I'm seeing is that the new item is rendered
on top of the first item. The existing items are not shifted down as
in the <ul> case. Is this normal behavior for tables? Here's what I'm
doing:

VIEW:
<%= form_remote_tag(:update => "receipt_list",
                     :url => { :action => :add_receipt },
                     :position => "top" ) %>
...
<%= end_form_tag %>
<table id="receipt_list">
...
</table>

CONTROLLER:
...
def add_receipt
   ...
   render :text => "<tr><td>"..."</td></tr>"
end

If anyone knows what's going on, I'd appreciate some help.

Thanks,

-Oscar

--
pgp fingerprint: BC64 2E7A CAEF 39E1 9544  80CA F7D5 784D FB46 16C1



--
pgp fingerprint: BC64 2E7A CAEF 39E1 9544  80CA F7D5 784D FB46 16C1
This topic is locked and can not be replied to.