hey all,
I’m trying (badly) to create a variable and pass it to a document.write so i calls the array name. I have my code to get what the number of the week is for the year and from that i have to use it to determine whether team a or team b are on shift. I have multiple arrays A1, A2, A3 and B1, B2, B3 what i need is once my script determines what week it is, it divides it by 2 and then if the remainder is 0 team A are on or if 1 team B are on.
I then set a variable of weekteam which i then try to use to reference an array
if (weeknum % 2 == 0)
var weekteam=”A”;
else
var weekteam=”B”;
var weekname1=(weekteam + “1”);
document.write(‘<BR> test ‘ + ‘$weekname1′[5]);
Its probably something simple here but for the life of me i cant get it. Any help would be appreciated.
Thanks
Paddy