Hi all: I met a problem like this. Here is the scenario: if I have a database table A, which contains several columns, for example. Once the sever pass the database to web client, it's rendered into a HTML table. Now, here is some requirements for the client side. The user will be able to add/delete several rows from the HTML table, in addition, they will also be able the change the row order. If we could finish the client side with the help from some jquery plugin (for example:
http://www.isocra.com/2007/07/dragging-and-dropping-table-rows-in-javascript/#demo[
^]). Now, my question is, how could I pass this information back to server? Because there are new rows and deleted rows, the original table row order (like the plugin tableDnD.serialize function is not sufficient) is not enough. How to do this?Please let me know if anyone have idea about that.I got stuck in it since 5 days.Thanking you in advance
on drop this javascript function is calling.
this.onDrop = function(table, droppedRow) {
var rows = this.table.tBodies[0].rows;
var debugStr = "rows now: ";
for (var i=0; i<rows.length; i++) {
debugStr += rows[i].id+" ";
}
}
now i have to send new position of row to server side.How to do this?