<?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[Stampare messaggio al termine del countdown javascript]]></title><description><![CDATA[<p dir="auto">Salve avrei bisogno di un aiutino per comprendere come stampare un messaggio del tipo " Annuncio terminato" al termine di un countdown in javascript.<br />
Di seguito posto il codice dello script:</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>
]]></description><link>https://dev.connect.gt/topic/143255/stampare-messaggio-al-termine-del-countdown-javascript</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 11:20:28 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/143255.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 15 Jan 2011 15:22:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Stampare messaggio al termine del countdown javascript on Mon, 17 Jan 2011 06:18:13 GMT]]></title><description><![CDATA[<p dir="auto">Per la terminazione dell'evento va bene una certa data? A una certa ora?</p>
]]></description><link>https://dev.connect.gt/post/965952</link><guid isPermaLink="true">https://dev.connect.gt/post/965952</guid><dc:creator><![CDATA[marcocarrieri]]></dc:creator><pubDate>Mon, 17 Jan 2011 06:18:13 GMT</pubDate></item><item><title><![CDATA[Reply to Stampare messaggio al termine del countdown javascript on Sat, 15 Jan 2011 17:46:59 GMT]]></title><description><![CDATA[<p dir="auto">Ciao e grazie per la risposta.<br />
Sono poco esperto potresti postarmi un codice di esenpio e dove inserirlo?<br />
Grazie</p>
]]></description><link>https://dev.connect.gt/post/965955</link><guid isPermaLink="true">https://dev.connect.gt/post/965955</guid><dc:creator><![CDATA[maxnegri]]></dc:creator><pubDate>Sat, 15 Jan 2011 17:46:59 GMT</pubDate></item><item><title><![CDATA[Reply to Stampare messaggio al termine del countdown javascript on Sat, 15 Jan 2011 16:39:31 GMT]]></title><description><![CDATA[<p dir="auto">Volendo potresti aavere un div con all'interno la scritta "EVENTO TERMINATO".<br />
Di default il display è settato a none.<br />
Appena invece il tempo è terminato, il display viene settato a block.</p>
]]></description><link>https://dev.connect.gt/post/965948</link><guid isPermaLink="true">https://dev.connect.gt/post/965948</guid><dc:creator><![CDATA[marcocarrieri]]></dc:creator><pubDate>Sat, 15 Jan 2011 16:39:31 GMT</pubDate></item></channel></rss>