home site map
sign gb read gb
news links
test
lastModified useless counter background colors big brother
graphics javascript
games computer
sf svenska
sun times convert size cascading menu secret

Testing JavaScript
and Access Counter



This page contains experiments with JavaScript and the Access Counter.
JavaScript is used only in test no. 7 to find the addresses of the Counter graphics.
To put an Access Counter on your page at Telia, you write this HTML tag in the document, inside its <BODY> - </BODY> tags:

<IMG SRC="/cgi-bin/Count.cgi?df=bje_cnt.dat">

This will call a cgi script that will check how many visitors there have been to the page, and compose the right picture to show in the document.
("bje_cnt.dat" or "index.dat" etc. is the file where the result is stored)

The standard counter looks like this:

Counter

Notice that this is only an example, this picture is not a real counter.
In the rest of this document there are genuine calls to the Access Counter.


Test no. 1 - Random Counter

You are visitor number:
counter
since 1998-09-25.


 
Here the counter has been called without indicating a data file, like this: <IMG SRC="/cgi-bin/Count.cgi?df=random">. Then a random number will be shown.
Test no. 2 - Standard Counter (almost)

You are visitor number:
counter
since 1998-09-25.


 
Here the counter has been called with a wider frame (ft=10 in stead of ft=6), its frame color is changed (frgb=ffcc00), and the green color in the standard counter is changed to light red (srgb=00ff00|prgb=ff6633).
Test no. 3 - Big Counter

You are visitor number:
counter
since 1998-09-25.


 
Here I have tried to make a larger counter by calling the standard counter with a wider frame (ft=10), and then change the size of the picture to width=220 height=80, which is twice the normal size of a counter with a frame width of 10.
Notice that this counter recieved the start value 1000 (st=1000).
Test no. 4 - Date

date


 
Here today's date is shown instead of the number of visits. The counter has been called with the option (display=date), and date format year-month-day (dformat=YYMMDD). It has a wider frame (ft=10) with changed frame color (frgb=ffcc99), and the green color in the standard counter has been changed to greenish yellow (srgb=00ff00|prgb=ccff00).
Test no. 5 - Time

time


 
This shows the current time. The counter has been called with the same parameters as in test no. 4, but with the 24-hour clock option (display=clock|tformat=24) instead of the date option.
Test no. 6 - Date and time

date time


 
Here the current date and time is shown together in a table. The counter has been called with the option (display=date), and with the 24-hour clock option (display=clock|tformat=24) just like in tests no. 4 and 5, but without frames (ft=0), and the green color in the standard counter has been changed to light red (srgb=00ff00|prgb=ff3333).

This is what the table looks like with BORDER=1 and without date and time:


Test no. 7 - Addresses

The addresses (URLs) of the counter images are:


lastMod On my page for testing "Last-modified-date" there are more examples of how to use an Access Counter.

Tele2 At swipnet.se the Access Counter is called by inserting the code
<!--#exec cgi="/cgi-bin/counter"-->
in the HTML code of the page. You can produce a more advanced Access Counter by using JavaScript, you can for example show the result multiple times without increasing the count of the Access Counter each time.

Jvsc Back to the JavaScript page!

© Bo Johansson 2006-02-19

[Homepage] [Site map] [Sign Guestbook] [Read Guestbook] [What's New?] [Links]
[Web Graphics] [JavaScript] [Games] [Computer Resources] [Science Fiction] [På svenska!]
 
[lastModified] [Useless page] [Access Counter] [Change Background Color] [Big Brother]
[Sun times] [Measurement conversion] [Screen & Windows Size] [Cascading Menues] [Protected Text]


Any browser (?) !!! My pages can (hopefully) be viewed with ANY Web Browser.