This simple java script has worked great and been modified many times as the info banner at the top of the www.psnwa.org web site. One issue I have is that the Photo Society has a monthly online photo competition. The first fifteen days of the month members can enter images, and then the remainder of the month they can vote on the images. Twice a month I have been going out and manually changing the 'Time To Enter' and 'Time to Vote' banners, so I thought I would put in a simple if statement to automatically switch the two.... Or simple I thought as I have played with this and can't seem to get it to run. I am sure I am making a basic mistake, but darn if I can figure it out.
I am sure the reason is that I am trying to nest an if statement in the arrays. I tried pulling out the if statements and assigning the result to a variable that I then tried to insert into the array without any success either.
Here is the code as I have it now with the statements at the top to determine the day of the month and the if statements in two places (imgs array and bars array) to change the banner and bar below the banner.
I had originally tried with the if statements out of the array, but I must have had a sentex issue, becouse I put in your statement, and the variable into the array and it worked great.
Thank you again, I had been messing (messing up) with this simple edit for quite some time.
Bookmarks