D
Darren.Ratcliffe
Hi
The below pasted code is my attempt to get the text of a span to change
every second.
However, it seems to just set the text of the span to be the last item
in the array.
Can anybody help?
Many thanks in advance
Daz
<script language="javascript" type="text/jscript">
function DoWait()
{
vAirlines = new Array("Wind", "Rain", "Fire", "Earth");
for (i=0;i<vAirlines.length-1;i++)
{
string = "document.getElementById(\"spAirlineCount\").innerHTML = \""
+ vAirlines + "\"";
setTimeout(string, 1000);
}
}
DoWait();
</script>
<span id="spAirlineCount">000</span>
The below pasted code is my attempt to get the text of a span to change
every second.
However, it seems to just set the text of the span to be the last item
in the array.
Can anybody help?
Many thanks in advance
Daz
<script language="javascript" type="text/jscript">
function DoWait()
{
vAirlines = new Array("Wind", "Rain", "Fire", "Earth");
for (i=0;i<vAirlines.length-1;i++)
{
string = "document.getElementById(\"spAirlineCount\").innerHTML = \""
+ vAirlines + "\"";
setTimeout(string, 1000);
}
}
DoWait();
</script>
<span id="spAirlineCount">000</span>