AJAX/RJS Updating of Table Rows


#1

I’m trying to update a table row (i.e. replace a

) 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


#2

maybe you can replace your table with a css-based layout? table-layouts
are
kind of legacy old-stuff anyway…

or maybe that:

updated content here

#3

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

is valid markup.

Cheers,
Nicholas


#4

No, but

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.

<% link_to_remote “Change it!”, :url => {blah blah}, :update =>
‘the_row’ %>

-Derrick S.


#5

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/taconite-prototype-rails

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

Cheers,
Nicholas


#6

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/taconite-prototype-rails

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

Cheers,
Nicholas


#7

On 4/20/06, Nicholas H. removed_email_address@domain.invalid wrote:

I’m trying to update a table row (i.e. replace a

) 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.


#8

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

) 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