Changing text on a web page randomly after 24 hour time frame
Hi
I think this is JavaScript code i need.
I am making a prediction web site it works on the basis that a person picks a number from a number grid and that takes them to the relevant numbers page.This page shows the prediction in text.
what i would like to do is have the prediction text change after say 48hours automatically to another different prediction text but on the same page and relevant to the same number ..so one day a person picks say .. number 1 and they get the word "hello"then they click on number one again 48hours later and get the word "goodbye". so the text is constantly changing every 48hours to something completely new.
please help i am a JavaScript rookie.
Re: Changing text on a web page randomly after 24 hour time frame
In order for you to change every 48 hours, you would need to store timestamp data in a cookie and access it upon visiting to check relevant time.
How much do you have done already?
Re: Changing text on a web page randomly after 24 hour time frame
I have done nothing so far just trying to see a script that I can at least learn from,its so frustrating.
Thanks for replying PA .
Re: Changing text on a web page randomly after 24 hour time frame
This isn't going to just be a simple job. I would suggest going through the simple JavaScript tutorial from W3Schools.
http://www.w3schools.com/js/default.asp
Focus on the cookies and DOM for what you need.