Forum: Ruby on Rails AJAX/RJS Updating of Table Rows

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.
Nicholas H. (Guest)
on 2006-04-20 16:40
(Received via mailing list)
I'm trying to update a table row (i.e. replace a <tr></tr>) using
AJAX/RJS but of course this cannot be done in IE (works fine in
Firefox). I have googled but have not found any solutions, only a lot
of discussion. Does anyone have a solution to this problem?

Cheers,
Nicholas
Peter E. (Guest)
on 2006-04-20 17:02
(Received via mailing list)
maybe you can replace your table with a css-based layout? table-layouts
are
kind of legacy old-stuff anyway...

or maybe that:

<tr><div id="content">updated content here</div></tr>
Nicholas H. (Guest)
on 2006-04-20 17:14
(Received via mailing list)
Thanks, Peter -- but I'm using tables for a legimate purpose, tabular
data; i.e. I'm not using for layout. I don't think
<tr><div><td></td></div></tr> is valid markup.

Cheers,
Nicholas
unknown (Guest)
on 2006-04-20 17:17
(Received via mailing list)
On 4/20/06, Nicholas H. <removed_email_address@domain.invalid> wrote:
> I'm trying to update a table row (i.e. replace a <tr></tr>) using
> AJAX/RJS but of course this cannot be done in IE (works fine in
> Firefox). I have googled but have not found any solutions, only a lot
> of discussion. Does anyone have a solution to this problem?

Take a look at Richard W.'s Ajax Scaffold Generator:
    http://www.ajaxscaffold.com/

It uses RJS to update table rows and is "Guaranteed to work on Firefox
1+, IE 6+ and Safari 10+".  I think his solution is something like
remove the original row, insert the updated row, and move it into the
original row's position.
Derrick S. (Guest)
on 2006-04-20 17:26
(Received via mailing list)
No, but  <tr><td><div></div></td></tr> is.

If you assign an id to the td you can't use it in the update?
Haven't tried this myself, but I'm surprised that it wouldn't work.

<tr><td id="the_row"><td></tr>

<% link_to_remote "Change it!", :url => {blah blah}, :update =>
'the_row' %>

-Derrick S.
Nicholas H. (Guest)
on 2006-04-20 17:32
(Received via mailing list)
Thank you for your help everybody, I will check out these solutions as
well. I have also found this:

http://www.larrygoats.com/articles/2006/01/26/taco...

I dropped his script it and it fixed my problem right away.

Cheers,
Nicholas
Nicholas H. (Guest)
on 2006-04-20 17:32
(Received via mailing list)
Thank you for your help everybody, I will check out these solutions as
well. I have also found this:

http://www.larrygoats.com/articles/2006/01/26/taco...

 I dropped his script it and it fixed my problem right away.

Cheers,
Nicholas
Pete F. (Guest)
on 2006-04-20 19:05
(Received via mailing list)
Sorry for the late reply, but I wrote an article that sort of deals with
this, and then some:

http://unspace.ca/discover/datagrid/

Good luck!
Pete

----- Original Message -----
From: "Nicholas H." <removed_email_address@domain.invalid>
To: <removed_email_address@domain.invalid>
Sent: Thursday, April 20, 2006 8:37 AM
Subject: [Rails] AJAX/RJS Updating of Table Rows


I'm trying to update a table row (i.e. replace a <tr></tr>) using
AJAX/RJS but of course this cannot be done in IE (works fine in
Firefox). I have googled but have not found any solutions, only a lot
of discussion. Does anyone have a solution to this problem?

Cheers,
Nicholas
_______________________________________________
Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails
This topic is locked and can not be replied to.