Okay I have sussed handling multiple SPan IDS in my jscript
Using an array where element "i" contains the span id and "i+1" contains the text image url etc.
Using the following to wrtie it to the web page:
document.getElementById(update[0]).innerHTML = update[1];
document.getElementById(update[2]).innerHTML = update[3];
document.getElementById(update[4]).innerHTML = update[5];
document.getElementById(update[6]).innerHTML = update[7];
document.getElementById(update[8]).innerHTML = update[9];
Which works fine; However I would prefere it in a loop anc thought it would be simply;
do {
document.getElementById(update[i]).innerHTML = update[i+1];
i++;
} while ( i <=8 )
But this gives me an error saying "is null or not an object";
I tested the loop for one line ie setting the value of i it will loop till to "0" and this worked... So I am bit confused.. Any pointers?