Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 28th, 2006, 04:41 AM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Change all cells in a row via AJAX

Hi all.

I've been googling for a solution to this problem and although I've found some code that has acted as pointers I still haven't found a solution.

I want to be able to update a single row in a table via AJAX. I have a working AJAX "loader" that uses the id of an object to alter it's innerHTML attribute. Nothing new or fancy there.

When reading about the innerHTMl of a tr object it seems to me that this is read only and all solutions I've found so far enumerates the cells in the row and then changes them one by one.

I could modify my loader to grab the id of the row and then alter the cells one by one but that means that the code being loaded (by the loader) either has to be aware of what cell I'm updating or I'm going to have to use different code for each cell.

Not the most elegant solution (I hope).

I might be able to get rid of the table completely but I'm not sure how robust the CSS for emulating table rows would be so I'd like to keep the table as long as possible and fall back to CSS only when I have to.

Any ideas?

TIA!
 
Old January 9th, 2007, 08:53 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii MartinNr5!!

Have you found the solution.

If CSS in not the issue then probably I will Create a row with same id
1>Delete the row
2>Append the newly created row at particulare index of the table.

Since you want to retain CSS , i m thinking for any other approach

Cheers :)

vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax change textbox bgcolor after Criteria met mkthompson Ajax 1 July 28th, 2008 08:56 AM
Gidview - Moving cells to a new row rturner003 ASP.NET 2.0 Professional 1 December 1st, 2006 11:35 AM
change row color vivek_pon VS.NET 2002/2003 3 April 13th, 2006 01:42 PM
Datagrid row change event? djam C# 0 March 9th, 2005 04:22 AM
Update excel cells on change of another program pjhlin VB How-To 2 January 20th, 2004 11:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.