In this case it is a simple clock, however when I tell it to run a
function it just returns the error "Uncaught ReferenceError:
currentTime is not defined"...
Below is a sample of the code used to execute the clock...
function currentTime(format)
{
current = new Date();
hour = current.getHours();
min = current.getMinutes();
sec = current.getSeconds();
if(min <= 9) { min = '0' + min; }
if(sec <= 9) { sec = '0' + sec; }
if(format == 24)
{
if(hour < 10)
{
hour = '0' + hour;
}
}
else
{
if(hour > 12)
{
hour = hour - 12;
extra = ' PM';
}
else
{
extra = ' AM';
}
if(hour == 12)
{
extra = ' PM';
}
if(hour == 00)
{
hour = '12';
}
if(hour <= 9)
{
hour = '0' + hour;
}
}
$('#time').html('<strong>' + hour + ':' + min + ':' + sec +
((format != 24) ? extra : '') + '</strong>');
setTimeout('currentTime()',1000);
}
if(option.time != 'false')
{
if(option.timeFormat == 24)
{
currentTime('24');
}
else
{
currentTime('12');
}
}
I have tried removing the quotes around 'currentTime()'...except I
just recieve the error "RangeError: Maximum call stack size
exceeded"...
Just hoping I won't have to push the code into the page to execute
it...
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
Thanks for the help...
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-extensions+unsubscr...@chromium.org<chromium-extensions%2Bunsubscr...@chromium.org>