Caution: This may be nonfunctional on NS4.7+. Tested it on IE6 earlier but now it aint working with NS4.7. Either I broke it or it's not cross-browser yet.
Here is an example of SVG (drawing XML dialect) interacting with a server through get reqests (can also do post requests). The original concept was posted on the svg-developers yahoo group in early Feb 2002, and I've adapted it to perl (of course).
The startup screen gives you 2 squares. Clicking on the squares causes a request to a database to go out which returns the xml for the drawings of the circles that fall within the square's periphery.
Key point: This is all done from within a single browser window, and with no refresh of the image.
Other key point: My server is not running mod_perl, which would make the lag about 1/2 as bad (currently it's 500mS for me, with 100 entries x 5 fields in the database, but then again the request is going 1/2 around the world for me).
Modules used:
- CGI (as a demo shortcut to grab the parameters
- SVG (for the client-DBI connection using SVG messages)
- CGI::Carp (this is a hosted server and I needed to see my errors sans error log access)
- DBI (with mySQL)
I've included the source files for inspection.
Next step: drawing onto the space and updatating the database from that.
I used SVG, but you could just as well use xmlrpc and dhtml for this.
hackmare.