Ajax table data

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Ajax table data

Post by Todd_Z »

I currently have a setup where the js makes a call to a php page which returns pagination information [current page and page count], and a list of <tr>'s with <td>'s populated with the requested data.

In firefox, I use the innerHTML property for a tbody to insert the data. This way, the header cells line up fine with the data.

In IE, you can't use the innerHTML property of a tbody.

Is there a library available or a method for the php returning XML and having js turn it into rows in a table? Would this way be very slow? [~25 rows with ~8 cells per page]

The resulting rows also have html tags like <a> <input> <img>, so that may affect the xml option
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Without seeing what you've got, maybe you can put the tbody inside of a div and have it sent with the data from the server.
Post Reply