• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • Last Modified:

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
0
fuz043097
Asked:
fuz043097
1 Solution
 
jakedCommented:
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+.

0
 
fuz043097Author Commented:
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

0
 
julio011597Commented:
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.
0
Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

 
squintCommented:
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.
0
 
icdCommented:
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).
0
 
fuz043097Author Commented:
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.
0
 
MaDdUCKCommented:
can't you just set the img tags width=0 hieght=0 border=0, then the image is invisible unless browsed with lynx.

that would be my way and it works fine.
0
 
fuz043097Author Commented:
I tried that but I noticed that in netscape 4.04 it
would still display the image.
0
 
MaDdUCKCommented:
interesting...it does not on my version.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now