in reply to Automatic execution of a CGI program on a web page besides a counter

I mean no disrespect if I am incorrect, but perhaps you are confusing server-side with client-side. Perl and CGI(.pm) run server side. The results are dumped to a page, and that is all. You can generate JavaScript code with perl (it's a little tricky, and you'll fall in love with escaping characters all over again), but once it's in the hands of the browser, Perl/CGI stops working.

The counter example you listed is a little skewed. Counters usually work like:
<img src="mycounter.pl?acct=mysomething&foo=bar&eep=yah">
The image is then dynamically generated by the counter script and you have something that has a dynamic feel, when really it's some dynamic image magic being thrown together into a static page, and all of the magic occurs on the server.

From there, it becomes the responsibility of the web page to be dynamic, and there is the realm of JavaScript.

Now, the answer to your question relies mostly on what you mean by dynamic. By dynamic do you mean: The first one maps to using JavaScript, and the second one maps to using Perl and CGI. It's likely you want a combination of both. As a somewhat interesting side note, ActiveState offers PerlScript, which I think can be run as a dynamic browser technology using the DOM, but I've really never tried it. Now THOSE would be some powerful web pages, but that's a strange dependancy. Good luck with your project. If you provide some more details as to what you'd like to accomplish (perhaps demo the direction you'd like to go in), the crazy camel riders might be able to help a little more.

    --jb
  • Comment on Re: Automatic execution of a CGI program on a web page besides a counter
  • Download Code