<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[countdown javascript che non si ferma.]]></title><description><![CDATA[<p dir="auto">Salve a tutti, premetto che non sono molto esperto in materia e questa credo sia la sezione giusta dove postare il mio piccolo problema.</p>
<p dir="auto">Ho uno javascript countdown che alla scadenza non si ferma e continua all'indietro.<br />
Io vorrei poter stampare un messaggio del tipo " Tempo Scaduto " alla fine del countdown.</p>
<p dir="auto">Lo Script è il seguente:</p>
<pre><code>&lt;!--Countdown Timer starts here--&gt;
&lt;script type="text/javascript"&gt;
// Description: displays the amount of time until the "dateFuture" entered below.
// NOTE: the month entered must be one less than current month. ie; 0=January, 11=December
// NOTE: the hour is in 24 hour format. 0=12am, 15=3pm etc
// format: dateFuture = new Date(year,month-1,day,hour,min,sec)
// example: dateFuture = new Date(2003,03,26,14,15,00) = April 26, 2003 - 2:15:00 pm
 
dateFuture = new Date('&lt;?php echo $coopen_timer[0]; ?&gt;','&lt;?php echo ($coopen_timer[1] - 1) ; ?&gt;','&lt;?php echo $coopen_timer1[0]; ?&gt;','&lt;?php echo $coopen_timer3[0]; ?&gt;','&lt;?php echo $coopen_timer3[1]; ?&gt;','&lt;?php echo $coopen_timer3[2]; ?&gt;'); 
//alert(dateFuture);
function GetCount(){
dateNow = new Date(); //grab current date
amount = dateFuture.getTime() - dateNow.getTime(); //calc milliseconds between dates
delete dateNow;
days=0;hours=0;mins=0;secs=0;nodays="";nohrs="";nomins="";
amount = Math.floor(amount/1000);//kill the "milliseconds" so just 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)
{
nodays = days +((days!=1)?"":"");
//alert(nodays);
document.getElementById('tot_days').innerHTML=nodays;
}
else
{
document.getElementById('tot_days').innerHTML=''; 
document.getElementById('days').innerHTML=''; 
}
 
if(days != 0 || hours != 0)
{
nohrs = hours +((hours!=1)?"":"");
//alert(nohrs);
document.getElementById('tot_hrs').innerHTML=nohrs; 
}
else
{
document.getElementById('tot_hrs').innerHTML=''; 
document.getElementById('hrs').innerHTML=''; 
}
 
if(days != 0 || hours != 0 || mins != 0)
{
nomins = mins +((mins!=1)?"":"");
//alert(nomins);
document.getElementById('tot_mins').innerHTML=nomins; 
}
else
{
document.getElementById('tot_mins').innerHTML=''; 
document.getElementById('mins').innerHTML=''; 
} 
 
document.getElementById('tot_secs').innerHTML = secs;
setTimeout("GetCount()", 1000);
 
}
window.onload=GetCount;//call when everything has loaded
&lt;/script&gt;
&lt;!--Countdown Timer ends here--&gt;
</code></pre>
<p dir="auto">Questo è il codice che stampa il countdown:</p>
<p dir="auto">&lt;span class="color000 font18" id="tot_days"&gt;&lt;/span&gt;<br />
&lt;span class="color666 font18n mr10" id="days"&gt; &lt;?php echo $language['days']; ?&gt; &lt;/span&gt;&lt;span class="color000 font18" id="tot_hrs"&gt;<br />
&lt;/span&gt;<br />
&lt;span class="color666 font18n mr10" id="hrs"&gt; &lt;?php echo $language['hr']; ?&gt; &lt;/span&gt;<br />
&lt;span class="color000 font18" id="tot_mins"&gt;&lt;/span&gt;<br />
&lt;span class="color666 font18n" id="mins"&gt; &lt;?php echo $language['min']; ?&gt; &lt;/span&gt;<br />
&lt;span class="color000 font18" id="tot_secs"&gt;&lt;/span&gt;<br />
&lt;span class="color666 font18n" id="secs"&gt; &lt;?php echo $language['sec']; ?&gt; &lt;/span&gt;</p>
<p dir="auto">Grazie per l'attenzione <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=2190ae3dadd" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://dev.connect.gt/topic/143241/countdown-javascript-che-non-si-ferma</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 11:20:31 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/143241.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 15 Jan 2011 11:42:27 GMT</pubDate><ttl>60</ttl></channel></rss>