Odbrojavanje do nove godine - Joomla! Forum - community, help and support


potrebna mi je ekstenzija koja ce da mi odbrojava jos koliko je ostalo nove godine?

pomoc neka? ;)

za sada sam naso samo ovo ovako preko html coda, ali mi se ne svidja.

<script type="text/javascript" language="javascript">
<!--

datefuture = new date(2012,11,31,12,00,00);

function getcount(){

datenow = new date(); //grab current date
amount = datefuture.gettime() - datenow.gettime(); //calc milliseconds between dates
delete datenow;

// time past
if(amount < 0){
document.getelementbyid('countbox').innerhtml="now!";
}
// date still good
else{
days=0;hours=0;mins=0;secs=0;out="";

amount = math.floor(amount/1000);//kill "milliseconds" secs

days=math.floor(amount/86400);//days
amount=amount%86400;

hours=math.floor(amount/3600);//hours
amount=amount%3600;

mins=math.floor(amount/60);//minutes
amount=amount%60;

secs=math.floor(amount);//seconds

if(days != 0){out += days +" day"+((days!=1)?"s":"")+", ";}
if(days != 0 || hours != 0){out += hours +" hour"+((hours!=1)?"s":"")+", ";}
if(days != 0 || hours != 0 || mins != 0){out += mins +" minute"+((mins!=1)?"s":"")+", ";}
out += secs +" seconds";
document.getelementbyid('countbox').innerhtml=out;

settimeout("getcount()", 1000);
}
}

window.onload=function(){getcount();}//call when has loaded

//-->
</script>
<div id="countbox">
&nbsp;</div>

joomla extension directory je jedno carobno mesto druze :)

http://extensions.joomla.org/extensions ... /countdown

pozdrav





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support