Can anyone give me an idea on how to go about using javascript to change which page is shown depending on the date. Or if you know of a better way, help there would be appreciated. I am a beginner in java so my mistakes might be very stupid but I am giving it a whirl. This is what I tried with no success... <!-- var day = currentTime.getDate() if (day = "23") { document.write("<META HTTP-EQUIV="Refresh" CONTENT="2; URL=http://www.google.com">") } --!> And then just an if else thing for each day of the month... That's the basics, probably butchered it so any pro help would be appreciated.
You can use something like this: <html> <head> <script language="javascript"> var urlday = [ "http://www.yoursite.com/page-for-sunday.html", "http://www.yoursite.com/page-for-monday.html", "http://www.yoursite.com/page-for-tuesday.html", "http://www.yoursite.com/another.html", "http://www.yoursite.com/etc.html", "http://www.yoursite.com/friday.html", "http://www.yoursite.com/saturday.html" ]; var today = new Date(); document.location = urlday[ today.getDay() ]; </script> </head <body> To be redirected by javascript. </body> </html> Code (markup):