View Full Version : Using javascript code in guestbook header
Dmitrey
01-14-2008, 07:39 AM
hi all,
I want to add javascript-based web visitors counters from the page
http://openopt.blogspot.com (right column)
to my guestbook header.
I have read guestbook > settings but I can't understand how it can be done.
Thank you in advance, D.
Andreas
01-14-2008, 10:53 AM
Hi,
Using javascript you can display guestbook statistics on your webpage/blog. In the header of your webpage you need to get the information from our server. The link that should be placed in your header is:
<head>
<script type="text/javascript"
src="http://www.ultraguest.com/?id=1041779607&type=js"></script>
</head>
You need to replace the numbers in red with your guestbook ID. Now the following javascript variables are accessible from your webpage:
var messages = 375;
var uniquehits = 225765;
var totalhits = 655110;
These variables are not shown on your webpage before you add the following code where you want the numbers to show up:
<script type="text/javascript">
document.write(messages)
document.write(uniquehits)
document.write(totalhits)
</script>
This code will display the number only so you migth want to add some text saying what the numbers are telling.
Please let me know if you need any further help!