Alright, I am running into an error I just can’t run down here, maybe a fresh, experienced set of eye can help me out and tell me what is going on. If I comment out the function change(a) there is no issue, but when it is not chrome, ie, and firefox all throw up on me with the error in the title, I put the code through Lint and there are no errors, help me if you can pls. Here is a straight copy and paste from my js, this error is happening in line 1 of my page. Any help is greatly appreciated.
[CODE]
function JSClock()
{
var timeOut, now, time, app, hour, min, sec, ampm, size;
now = new Date();
hour = now.getHours(now.setHours(now.getHours() + 14));
ampm = (hour >= 12) ? ‘ P.M.’ : ‘ A.M.’;
if (hour > 12) { hour = hour – 12; }
if (hour < 10) { hour = ‘ ‘ + hour; }
min = now.getMinutes();
if (min < 10) { min = ‘0’ + min; }
sec = now.getSeconds();
if (sec < 10) { sec = ‘0’ + sec; }
time = hour + ‘:’ + min + ‘:’ + sec + ampm;
document.getElementById(“time”).innerText = time;
timeOut = setTimeout(‘JSClock()’, 1000);
}
function LoadImages(){
var a;
a = new Image();
a.src = “images/obattle.jpg”;
a = new Image();
a.src = “images/obio.jpg”;
a = new Image();
a.src = “images/ocart.jpg”;
a = new Image();
a.src = “images/ofinancials.jpg”;
a = new Image();
a.src = “images/ologout.jpg”;
a = new Image();
a.src = “images/oadmin.jpg”;
a = new Image();
a.src = “images/ohtc.jpg”;
a = new Image();
a.src = “images/omisc.jpg”;
a = new Image();
a.src = “images/oaddstats.jpg”;
a = new Image();
a.src = “images/oattacks.jpg”;
a = new Image();
a.src = “images/oraces.jpg”;
a = new Image();
a.src = “images/orats.jpg”;
a = new Image();
a.src = “images/osnews.jpg”;
}
function change(a){
b = document.getElementById(a).src;
switch (b){
case “images/y.jpg”:
document.getElementById(a).src = “images/r.jpg”;
break;
case “images/g.jpg”:
document.getElementById(a).src = “images/y.jpg”;
break;
case “images/r.jpg”:
document.getElementById(a).src = “images/g.jpg”;
break;
default:
break;
}
}
/*
function ichange(a){
b = document.getElementById(a).src;
if (b = “images/y.jpg”)
{
document.getElementById(a).src = “images/r.jpg”;
}
if (b = “images/g.jpg”)
{
document.getElementById(a).src = “images/y.jpg”;
}
if (b = “images/r.jpg”)
{
document.getElementById(a).src = “images/g.jpg”;
}
}
*/