Howdy Monks,
Normally, to serve a dynamic graph (via STDOUT without having to write to the disk first) within a Webpage, I can just do that:
#! /usr/local/bin/perl -w
use strict;
use Apache::Request ();
my $r = shift;
$r->content_type('text/html');
$r->send_http_header;
print <<EOM;
<html><body>
<p>My Chart</p>
<p><img src=MyGD.pl></p>
<p>The End</p>
</body></html>
EOM
That is, just point my image source to the Perl script that generates the graph. But how do I do something equivalent with a standalone HTML page on my desktop without CGI and Webserver?
Are there pure client-side scripting solutions (be it PerlScript, JavaScript or VBScript)?
I could use Net::Daemon to write a mini Webserver, and I did, but then I might as well use Apache. I could just use Tk as well, yet I'm curious how to serve a graph dynamically (via STDOUT without writing to disk first) on a standalone HTML page on my desktop (since if I let the browser, a PerlScript or a VBScript could read/write files or even execute programs from within a browser, so I thought it should be able to serve graph dynamically, and more or less easily as in CGI, from within a browser on client-side alone).
There got to be more than one way to do it, right? Without needing a Webserver and CGI at all.
Thanks.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.