Can anybody tell what i am doing wrong?
The counter dosn´t work as it i supposed to. I would like for the counter to count to 6 seconds before the messageDIV is closed.
i am by no means a javascript GURU so bare with me
function joomlaMessage()
{
var systemMessage, messageDiv, c, count;
systemMessage = document.getElementById(‘system-message’);
messageDIV = document.getElementById(‘MessageJoomla’);
c = 0;
if(systemMessage !=null)
{
if(c < 6)
{
messageDIV.style.display = ‘block’;
count=c+1;
messageDIV.innerHTML = "The window will close in " + count + “Seconds”;
setTimeout(“joomlaMessage()”, 1000);
}
else
{
joomlaMessageClose();
}
}
}