Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

AJAX, Perl/CGI, Apache, MySQL

by hackdaddy (Hermit)
on Nov 17, 2005 at 22:28 UTC ( [id://509621]=perlquestion: print w/replies, xml ) Need Help??

hackdaddy has asked for the wisdom of the Perl Monks concerning the following question:

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.

I also want to stream log files to the AJAX client at regular intervals.

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?

Thanks.

Replies are listed 'Best First'.
Re: AJAX, Perl/CGI, Apache, MySQL
by ikegami (Patriarch) on Nov 17, 2005 at 23:17 UTC
Re: AJAX, Perl/CGI, Apache, MySQL
by jZed (Prior) on Nov 17, 2005 at 23:42 UTC
    Ikegami already pointed you at my LiveGrid node. I've greatly souped up the module and am renaming it DBIx::Ajax because it does more than just liveGrids. Unfortunatley I'm off on some travels and won't be able to CPAN the newer version for a couple of weeks. The version on the node should give you an idea though.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://509621]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-24 01:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found