By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,775 Members | 1,399 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,775 IT Pros & Developers. It's quick & easy.

File name set by getMonth();

P: 2
I run a site that has a photo on the front page that changes each month, repeating after a year.

Is there a way I can set the file name of the photo using getMonth(); so that the correct photo for each month is shown?

E.g. every January photo0, every February photo1, every March photo2 and so on will show automatically without the need to edit the file.
Sep 24 '15 #1
Share this Question
Share on Google+
2 Replies


Dormilich
Expert Mod 5K+
P: 8,639
Is there a way I can set the file name of the photo using getMonth(); so that the correct photo for each month is shown?
although I’d rather do that on the server side, you can do that in JS. set the image’s src attribute with the constructed URL.
Sep 25 '15 #2

P: 2
Thanks for the response Dormilich. Have to say I hadn't thought of using SSI, I'll give that a try.
Sep 25 '15 #3

Post your reply

Sign in to post your reply or Sign up for a free account.