View Full Version : JS counter & temporary windows
Crimson
09-29-2002, 08:21 PM
How do I make a counter out of JS?
How is a temporary window done? Example: www.faye.com Click on any of the links on the side, a pop-up will appear for 3 secs and automatically closes.
x_goose_x
09-29-2002, 08:32 PM
<script>
function temppop(url,sec) {
pop = window.open(url);
setTimeout("pop.close()",sec*1000);
}
</script>
<a href="javascript: temppop('page.htm','5');">
Crimson
09-29-2002, 09:41 PM
Do I put that JS on the <HEAD> section?
And can someone help me on the counter question?
joh6nn
09-29-2002, 10:56 PM
if you mean like a hit counter, you can't use javascript to make a counter. you have to use a server side language.
Crimson
09-30-2002, 08:58 AM
What's a server side language?
ez4ne12c
09-30-2002, 09:10 AM
A server side language is something that runs on the server not the clients machine. For example perl or php are server side languages. This gives you the advantage of being able to write and read files and do things like create counters. Of course you need access to a sever to do this which not everyone has... you can set your pc up as a server and run say perl on it but then you need to contend with all the security implications..
You can read and write files on the clients machine using ActiveX or you can put a bit of info in cookies (i think the limit is 4kB) but neither of these help you with a counter.
You can always use a free counter.. there are plenty of servers that offer this as a free service but often require acknowledgement which may not look good on your site
Hope this is some help
ez
Crimson
09-30-2002, 03:47 PM
Any good free counters I can use? Especially ones that doesn't come with an ad.
try
http://www.bravenet.com
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.