After a little experimentation, I have Ajax working and getting XML from a Perl/CGI script at regular intervals with the setInterval JavaScript function. In the JavaScript code, I parse the returned XML and append elements to populate a table at the interval rate.
One of the things I want to do with AJAX is refresh tables at regular intervals like Gmail does. However, I need to track the state of the table on the client side and only send rows from the server that are needed.
My question is: How do I keep track of the state of the JavaScript/HMTL I am creating and then get the appropriate xml data from the Apache web server? How does Gmail do this?