One way to do this is by invoking the perl script on an iframe, the script returning html with a javascript that dumps the info into the main html page by calling a javascript method there defined.
In other words:
Create the page's html with an invisible iframe like this <iframe src="your script" width="0" height="0">, and a javascript method, lets say Dumper.
Create your script that does whatever it has to do, and then output html code with a javascript function that holds the info you want to display and passes it to the Dumper function by calling parent.Dumper(txt);
In code:
Main page's HTML
...
<script language="javascript">
function Dumper(txt) {
// write txt somewhere on the page
}
</script>
...
<iframe src="perlscript.pl" width=0 height=0>
....
Now the the BODY for the HTML returned by the script
<body>
<script language="javascript">
var txt='the info you want to show';
parent.Dumper(txt);
</script>
</body>
...
|