But here's a stuff for fun, its simply a time counter that clicks every second and calculates the time spent over the page. I added this to my page. Quite unrealistic but it ready to go on for days :D/
Howz the look man ??
Where's the code??.
<div id='TimeKeeper'>
<script type='text/javascript'>
function TimeCounter() {
var tDay = document.getElementById('tDay');
var tHrs = document.getElementById('tHrs');
var tMin = document.getElementById('tMin');
var tSec = document.getElementById('tSec');
iDay = parseInt(tDay.childNodes[0].nodeValue);
iHrs = parseInt(tHrs.childNodes[0].nodeValue);
iMin = parseInt(tMin.childNodes[0].nodeValue);
iSec = parseInt(tSec.childNodes[0].nodeValue);
if((iSec+1)==60)
{
tSec.childNodes[0].nodeValue = (0);
iMin++;
if(iMin==60)
{
tMin.childNodes[0].nodeValue = (0);
iHrs++;
if(iHrs==24)
{
tHrs.childNodes[0].nodeValue = (0);
iDay++;
tDay.childNodes[0].nodeValue = (iDay);
}
else
tHrs.childNodes[0].nodeValue = (iHrs);
}
else
tMin.childNodes[0].nodeValue = (iMin);
}
else
tSec.childNodes[0].nodeValue = ( iSec + 1 );
}
var stop = setInterval("TimeCounter()",1000);
window.onload = TimeCounter;
</script>
<h2><a
href='http://samcoder.blogspot.com/2008/04/blogger-timewastecalc.html'>
HOW LONG DID I WASTE YOUR TIME
</a></h2>
<table border='0'>
<tr>
<td><span id='tDay' style='font-size:35px;'>0</span></td>
<td><span style='font-size:35px;'>:</span></td>
<td><span id='tHrs' style='font-size:35px;'>0</span></td>
<td><span style='font-size:35px;'>:</span></td>
<td><span id='tMin' style='font-size:35px;'>0</span></td>
<td><span style='font-size:35px;'>:</span></td>
<td><span id='tSec' style='font-size:35px;'>0</span></td>
</tr>
<tr>
<td>DAY</td>
<td/>
<td>HRS</td>
<td/>
<td>MIN</td>
<td/>
<td align='center'>SEC</td>
</tr>
</table>
</div>
What the hell i do with this code??
You need to add this code to Blogspot template.
Can you be more clear??
Just search for the code in the template's HTML View.
<div id='sidebar-wrapper'>
Is that all for the ticker??
No.You also need to add the top code.
Well that's all for the counter :D.
No comments:
Post a Comment