Can someone tell me? I want a link changes url every 24 hours for 7 days with 7 different links, then (last day) i want to start again from beginning. How can i do it? Help...
lucy24
12:01 am on Aug 17, 2017 (gmt 0)
What have you tried so far? It looks like about three lines of php (or other language of your choice) using day-of-week and 24-hour time, but html alone can't do it.
Edit: You'll also need to set caching on the relevant pages to < 1 hour if you've got repeat visitors.
keyplyr
3:31 am on Aug 17, 2017 (gmt 0)
You'll also need to set caching on the relevant pages to < 1 hour if you've got repeat visitors.
And then it will take roughly a month for those previously cached pages everyone picked up to drop off.
- - -
Here's a discussion on how to do it with JavaScript or Date Object method: [webmasterworld.com...]
Just substitute the images with URLs
Teliosmetonma
6:49 am on Aug 17, 2017 (gmt 0)
But this my problem. I dont want it with javascript, i want it with html
not2easy
6:55 am on Aug 17, 2017 (gmt 0)
HTML is not dynamic. You can add javacripts within HTML or php includes and it would display as html in your source, but HTML itself doesn't change once it is saved as a file.
Edited to add: You can manually change the HTML file every 24 hours and upload the new file to overwrite the old file. That gets tiresome pretty quickly.
Teliosmetonma
7:10 am on Aug 17, 2017 (gmt 0)
And how i can make javascript to html?
keyplyr
7:17 am on Aug 17, 2017 (gmt 0)
Read the link I provided. You have to do the work. That's how we learn :)
not2easy
7:18 am on Aug 17, 2017 (gmt 0)
It looks like keyplyr gave you a link to instructions. Maybe try that one?
Teliosmetonma
7:19 am on Aug 17, 2017 (gmt 0)
Ok thx
Teliosmetonma
12:17 pm on Aug 18, 2017 (gmt 0)
Guys i am writing id to num?:
if (linkId && arr[num].link) { document.getElementById(linkId).href = arr[num].link; }