T
Terry
I thought that when you call setTimeout with a function that has
parameters that the parameter have to be enclose in + signs. I tried
that but it is unfortunately not working.
My code is as follows:
function animate(letter,element,p,z)
{
for (d=0; d < letter[z].length;d++)
{
//alert("is it working?");
element[p*6+(letter[d])].style.backgroundImage = "url(images/
greendot.gif)";
if (p > 0)
element[(p-1)*6+(letter[d])].style.backgroundImage =
"url(images/graydot.gif)";
}
}
function anim8or(letter)
{
for(b=0,z=7;b<8;b++,z--)
for (p= 0; p <= z; p++)
setTimeout('animate(' +letter,
document.getElementById('A').getElementsByTagName('div'),p,z+ ');',
50*p);
}
The url to the page is http://theamazing.onlinewebshop.net/newanimate.htm
The error message that I am getting is
Error: missing ) after argument list
Source File: http://theamazing.onlinewebshop.net/newanimate.htm
Line: 51, Column: 42
Source Code:
animate(2,1,3,0,4,0,1,2,3,4,0,4,0,4,0,4,0,4
I appreciate the help that I anticipate on receiving.
Thanks in advance,
Terry
parameters that the parameter have to be enclose in + signs. I tried
that but it is unfortunately not working.
My code is as follows:
function animate(letter,element,p,z)
{
for (d=0; d < letter[z].length;d++)
{
//alert("is it working?");
element[p*6+(letter[d])].style.backgroundImage = "url(images/
greendot.gif)";
if (p > 0)
element[(p-1)*6+(letter[d])].style.backgroundImage =
"url(images/graydot.gif)";
}
}
function anim8or(letter)
{
for(b=0,z=7;b<8;b++,z--)
for (p= 0; p <= z; p++)
setTimeout('animate(' +letter,
document.getElementById('A').getElementsByTagName('div'),p,z+ ');',
50*p);
}
The url to the page is http://theamazing.onlinewebshop.net/newanimate.htm
The error message that I am getting is
Error: missing ) after argument list
Source File: http://theamazing.onlinewebshop.net/newanimate.htm
Line: 51, Column: 42
Source Code:
animate(2,1,3,0,4,0,1,2,3,4,0,4,0,4,0,4,0,4
I appreciate the help that I anticipate on receiving.
Thanks in advance,
Terry