dear gurus

i have the following  script pl.pl (yes, ugly but it works...)
-------------------
#!/usr/bin/perl
#pl.pl
use CGI;
$cgi = new CGI;

###adds 1 to  the counter
   open(COUNT,"count.txt") || die "Can't open count data file for Reading:
$!\n";
   $c = <COUNT>;
   close(COUNT);
   if ($count =~ /\n$/) {
      chop($c);
   }
   $c++;
   open(COUNT,">count.txt") || die "Can't open count data file for
Writing: $!\n";
   print COUNT "$c";
   close(COUNT);

###displays graphic numbers
print "Content-type:text/html\n\n";
print "<html><head><title>COUNTERING OF  JS.PL</title></head><body>\n";
print "ALO\n";
print qq(<img border="0" src="0.gif" width="36" height="40"><img
border="0" src="7.gif" width="36" height="40"><img border="0" src="6.gif"
width="36" height="40">);
print "</body></html>\n";
exit;
--------------------

this script works as i want it to - the counter adds and the graphics
display. verify if you like at;
http://www.dbiq.com/cgi-bin/mi/pl.pl

ok. so i want to  call it this way (no, i cant use  inline  frame, or the
<img> thing or ssi)

<html>
<head>
</head>
<body>
hi
<div><SCRIPT LANGUAGE="Javascript"
SRC="http://www.dbiq.com/cgi-bin/mi/pl.pl";></SCRIPT></div>
</body>
</html>


the script actually executes - confirmed because 1 is added to count.txt
BUT ... the graphics are never sent back. in fact, even regular text is
not sent back to the browser. i've tried changing the Content-type to
text/javascript. taking out of the print "<html ... line does not work
either - and in this case the direct invocation stops working.

your wisdom on how the graphics/anything can be displayed back on the
browser when the script is invoked as in the above html??

many thanks in advance!
best always
mario

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to