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.
833fbd3f58a8ebbeb43756e8634334ed?d=identicon&s=25 Nicholas Henry (Guest)
on 2006-04-20 14: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
36958dd94ca666a38483df282a5214d5?d=identicon&s=25 Peter Ertl (Guest)
on 2006-04-20 15: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>
833fbd3f58a8ebbeb43756e8634334ed?d=identicon&s=25 Nicholas Henry (Guest)
on 2006-04-20 15: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
E0c987f680cd640c14912ebfbf0f0f07?d=identicon&s=25 unknown (Guest)
on 2006-04-20 15:17
(Received via mailing list)
On 4/20/06, Nicholas Henry <nicholas.henry@gmail.com> 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 White'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.
Bc80625db60e9db4394c51d6c1892b49?d=identicon&s=25 Derrick Spell (Guest)
on 2006-04-20 15: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 Spell
780026f2b22cb9eafc6dfded033a93a7?d=identicon&s=25 Nicholas Henry (Guest)
on 2006-04-20 15: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
833fbd3f58a8ebbeb43756e8634334ed?d=identicon&s=25 Nicholas Henry (Guest)
on 2006-04-20 15: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
496ed7f402fc56b1f997855941272ad4?d=identicon&s=25 Pete Forde (Guest)
on 2006-04-20 17: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 Henry" <nicholas.henry@gmail.com>
To: <rails@lists.rubyonrails.org>
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
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
This topic is locked and can not be replied to.