Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback: irt.org FAQ Knowledge Base Q236

Feedback on: irt.org FAQ Knowledge Base Q236

Sent by Mark on November 22, 1999 at 16:48:12: - feedback #610

Technical:
Not technical enough

Comments:
if you take out the " just before the word image, it works... then when you put it in a table, doesn't work at all either with the " or without...


Sent by Mark on November 22, 1999 at 16:49:38: - feedback #611

Technical:
Not technical enough

Comments:
what would be the codes if the date instead of day was needed?


Sent by CP on Saturday July 28, 2007 at 10:43:06 - feedback #4851

Worth:

Length:

Technical:

Comments:
Try this - crude but effective. You can create a variable for your number of images, in this case 9.

var today = new Date();
var startdate = new Date();
startdate.setTime(1183894600000);
//nine pictures roll over every day in milliseconds
var daysInMs = today - startdate;
var day = (Math.round(daysInMs/86400000)% 9) + 1;// divisor is number of milliseconds in a day
var feature;
var pix = new Array();
feature = "jpeg/medium/" + day + ".jpg";;
var startLargepath = "jpeg/large/";
var endLargepath = ".html";
function updateImages()
{if (day == 9)
{pix[2] = 1;
pix[3] = 2;
pix[4] = 3;
}
else if (day == 8)
{pix[3] = 1;
pix[4] = 2;
pix[2] = (day + 1)
}
else if (day == 7)
{pix[4] = 1;
pix[3] = day + 2;
pix[2] = day + 1;
}
else for (var i = 2; i < 5; i++)
pix[i] = day + i-1;
}





©2018 Martin Webb