CoderZone.org

Category: >> Perl Code >> Run script with no output Bookmark and Share

<< lastnext >>

Snippet Name: Run script with no output

Description: Ever wonder how to run a CGI script without returning anything? Here's how.

Comment: (none)

Author: CoderZone
Language: PERL
Highlight Mode: PERL
Last Modified: March 05th, 2009

#!/usr/bin/perl
 
# You can point the src property of an image to a 
# CGI script - rather like a page counter - and get 
# the CGI script to return a 1x1 pixel blank image: 
 
<IMG SRC="cgi_script.cgi" WIDTH="1" HEIGHT="1">
 
# or, or you want to run the script after the document 
# has finished loading: 
 
<BODY onLoad="if (document.images) document.images['myImage'].src='cgi_script.cgi'">
 
<IMG SRC="blank.gif" WIDTH="1" HEIGHT="1">
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 3