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 (php script) 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/2008/02/table-drag-and-drop-jquery-plugin/). 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.
Here is my solution: pass the whole HTML table back to server, and then replace the whole database table with the information. In that case, how to pass a potentially big HTML table back to server? For this question, I found the answer like this: http://stackoverflow.com/questions/1872485/iterate-through-html-table-using-jquery-converting-the-data-in-the-table-into-js Basically,convert the whole HTML table into json format and pass it to server side to replace the whole table.
Is there a better solution than that? Any suggestions would be appreciated! Thanks!