470,596 Members | 1,117 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,596 developers. It's quick & easy.

File name set by getMonth();

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
2 1159
Dormilich
8,656 Expert Mod 8TB
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
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.

Similar topics

17 posts views Thread by Joe Laughlin | last post: by
4 posts views Thread by carmelo | last post: by
185 posts views Thread by jacob navia | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.