Above subject is shamelessy stolen from Jonathan, who has used it on IRC. Anyway, I got bored by doing my presentations with
$ ./parrot slpod.imc yapc.pod
... or some such. I wrote the predecessor of that at YAPC::EU::2003 during lunch break and the slides at dinner (no, that isn't a joke) and it caused a lot of fun at these days.
But in recent times all has to be AJAX, hasn't it? Alas, I started hacking examples/io/httpd.pir to support a CGI GET request, which is invoking Parrot subroutines, and put together 60 lines of JavaScript dealing mainly with keyboard requests to navigate between slide pieces and to send XMLHttpRequests. The XML thingy is totally optional, don't be afraid, plain text messages or html snippets are working fine too - and that's what the next slide presentation program will use.
Given that your GET request delivers a valid HTML snippet, and you got e.g. <div id="answer"></div> on your html page, then all you need to fill this with contents is mainly this JavaScript two-liner:
var x = document.getElementById('answer');
x.innerHTML = req.responseText;
That's almost it. I'll put together a working example in the parrot repo during the next days.
If I were cruel, I would suggest that someone write an HTTP parser with PGE, but I'll wait until the new version of TGE comes out. That ought to make it substantially easier.
It sure is. The whole "XMLHttpRequest" name is a misnomer, plain "HttpRequest" would have been more truthful.The XML thingy is totally optional
Even Wikipedia uses something very close to Sajax, internally: plain text, a leading "+" indicating success, a "-" indicating error.