Forum Moderators: DixonJones
But back to the present.
I learned the basics of HTML about 5 years ago but never really did anything with it until now.
And now I'm working on Javascript (which I think makes HTML seem easy) and although it would make things eaiser if I knew it all, I fall just a LITTLE bit short of that.
I'm starting to get comfortable with the basics of Javascript and I'm getting ready to add some more things to the site I've just made. And one of the things I'd like to have is a counter on the home page to tell me how many times the site has been visited.
Would someone tell me the basics on how that works? And by that I mean, what does the counter key on? or how does the counter know when the site has been visited?
Right now I'm thinking it has something to do with leaving a cookie on the visitors hard drive.
Again greetings and it's good to find a group of cool people who, like myself, enjoy building web pages.
<html>
<head>
<title>Reply to Ogletree</title>
</head>
<body>
<script language="javascript">
<!--
window.document.write("Thanks again Ogletree and I appreciate your help.")
//-->
</script>
</body>
</html>
You will need something a little more than javascript to put a counter on your web page.
Javascript is run at the client, by their web browser, so any counting it does, will only count their own visits and no one elses, and you will not be able to see the count yourself as javasscript cannot store info on your server, only as you say in cookies.
To do a counter you will need some kind of server side scripting, either ASP, PHP, Perl etc.