Link to home
Start Free TrialLog in
Avatar of fuz043097
fuz043097

asked on

Run Cgi without displaying graphics.

I have a counter and to get it to run now I am using the img to display the returned graphics.
However I do not want people to see my graphics.  How can I force the cgi program
to run when my page loads with out using the <img> tag. Basically not displaying anything.
Thanks,
Fuzz
Avatar of jaked
jaked

You can have the browser load the image but not display it with Javascript:

var a=new Image(); a.src=img;

This works in Netscape 3.0+ and Explorer 4.0+.

Avatar of fuz043097

ASKER

The script works fine with Explorer. But I could
not get it to update using netscape.
Any other hints to get it to work with netscape.
It would be nice if it would work for
Netscape 3.0 and explorer 3.0

That's because Netscape buffers Images got from Javascript.

You could set up a CGI that increments the counter and redirects users to the right Html page. If you like the idea, but don't know how to implement it, i could give you a few lines of C code or sh-shell code (Unix) to do the trick.
You can simply modify your script to return a one pixel image, and continue to use the <IMG> tag with a width and height attribute of one pixel each.
Q. Do you have the ability to modify the counter script or to write your own scripts?

Q. Are you able to run SSI (Server Side Includes)

If the answer to both of these is yes then it is simple to write your own script to count page accesses which does not result in *any* output to stdout. (not even a one by one pixel).
I do not have access to the script so I do not have much
choice right now.  I have tried about 4 differnet java
scripts and none seem to work with both browsers right.
I would like to try and set up a hidden frame now. Not to
sure how to go about this either.
ASKER CERTIFIED SOLUTION
Avatar of MaDdUCK
MaDdUCK

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I tried that but I noticed that in netscape 4.04 it
would still display the image.
interesting...it does not on my version.