No Javascript possible in News Show GK4?

Free responsive Joomla 2.5 and 3.x module to present your content with easy and intuitive way.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Tue Feb 21, 2012 12:13 pm
Helly guys!

I have setup a countdown using JavaScript that I included into several articles (I tried normal Joomla-acticles as well as K2-items). Everything is fine - I also included the countdown in a clear module and this also works fine.

The problem comes by trying to display it via News Show GK4:
There is no countdown being displayed - but the code...

Do you have any ideas how I can get this code to work?
User avatar
Expert Boarder

GK User
Tue Feb 21, 2012 12:25 pm
BTW - here's the code :-)


<script type='text/javascript'>
// Erstellt mit dem Countdown-Generator - Homepage-Total.de
// Die Monatsnamen bitte in englisch eintragen (Monatsname, Tag, Jahr, Uhrzeit)
var end = new Date('March 10, 2012 11:00:00');

function toSt2(n) {
var s = '';
if (n < 10) {
s += '0';
}
return (s + n).toString();
}

function toSt3(n) {
var s = '';
if (n < 10) {
s += '00';
}
else if (n < 100) {
s += '0';
}
return (s + n).toString();
}

function countdown() {
var d = new Date();
var count = Math.floor(end.getTime() - d.getTime());
if (count > 0) {
var miliseconds = toSt3(count%1000); count = Math.floor(count/1000);
var seconds = toSt2(count%60); count = Math.floor(count/60);
var minutes = toSt2(count%60); count = Math.floor(count/60);
var hours = toSt2(count%24); count = Math.floor(count/24);
var days = count;
document.getElementById('c1').innerHTML = days + ' TAGE';
document.getElementById('c2').innerHTML = hours + ':' + minutes + ':' + seconds
setTimeout('countdown()', 100);
}
else {
document.getElementById('c3').innerHTML = 'RibWich-Day läuft gerade!';
}
}
countdown();
</script>
User avatar
Expert Boarder


cron