Jquery table cells update

Can anyone point me in the right direction for updating each cell in my html table with data using ajax to post to my php output script?

eg table structure created on page load using php.

<tr id=“rowA”><td id=“rowA_1”>2121</td><td id=“rowA_2”>45454</td>…</tr>
<tr id=“rowB”><td id=“rowB_1”>4343</td><td id=“rowB_2”>9787</td>…</tr>

I’d like to be able to update each of the cells with new values derived from my php script using ajax.

How can i use jquery, ajax and php to achieve this?

Work backwards on the problem.

[list][]First start with what you need jQuery to do, to update the data.
[
]Work out the data that jQuery needs to perform the update, quite possibly as JSON data.
[]Figure out how to get PHP to provide that data.
[
]Then decide how to use AJAX to trigger your PHP code in the appropriate manner.[/list]

Then you can work forwards again, implementing the decisions that have been made.

my workflow for this would be something like this

  1. decide what event will send the ajax request… eg a button click?
  2. build your js function that will send the ajax request. the function will need to get the data to send to the php script and a url for the php script
  3. build the php script in 2 that will receive the data from 2. the script then uses this data to get the updated html table data from a database or whatever. the script then returns the updated data to the ajax object in your browser
  4. add code to the request handler function in the ajax object to first validate the returned updated data (if necessary) and then update the html table cells with the updated data.