Solved

Run Cgi without displaying graphics.

Posted on 1998-04-21
9
299 Views
Last Modified: 2013-12-25
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
Comment
Question by:fuz043097
9 Comments
 
LVL 2

Expert Comment

by:jaked
ID: 1827708
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
 

Author Comment

by:fuz043097
ID: 1827709
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
 
LVL 5

Expert Comment

by:julio011597
ID: 1827710
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
 
LVL 2

Expert Comment

by:squint
ID: 1827711
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 5

Expert Comment

by:icd
ID: 1827712
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
 

Author Comment

by:fuz043097
ID: 1827713
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
 
LVL 8

Accepted Solution

by:
MaDdUCK earned 150 total points
ID: 1827714
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
 

Author Comment

by:fuz043097
ID: 1827715
I tried that but I noticed that in netscape 4.04 it
would still display the image.
0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1827716
interesting...it does not on my version.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now