Can someone please tell me what wrong with my link function?
Posted: Thu Oct 26, 2006 7:52 am
function changelink(){
document.getElementById("url").href = arr[new Date().getSeconds()*2-1][0];
document.getElementById("url").appendChild(document.createTextNode(arr[new Date().getSeconds()*2-2][0]));
setTimeout('changelink()',1000);}
Hello, things are sort of working. this function is causing text links I have in an array to stack up, instead of replacing the one from before. Anyone know why? So I am getting a page full of web page links with a new one every second.
I also can't get it to loop when it gets to the end of the last seconds. These change every second and I have 60 of them in the array, when it gets to the last one it stops. The problem is in the function somewhere everything else is fine. Someone please help me, thank you very much.
document.getElementById("url").href = arr[new Date().getSeconds()*2-1][0];
document.getElementById("url").appendChild(document.createTextNode(arr[new Date().getSeconds()*2-2][0]));
setTimeout('changelink()',1000);}
Hello, things are sort of working. this function is causing text links I have in an array to stack up, instead of replacing the one from before. Anyone know why? So I am getting a page full of web page links with a new one every second.
I also can't get it to loop when it gets to the end of the last seconds. These change every second and I have 60 of them in the array, when it gets to the last one it stops. The problem is in the function somewhere everything else is fine. Someone please help me, thank you very much.