View Full Version : Navigation to a page after a date has passed

Nov 24th, 2005, 10:39 AM
Hey guys!

How do you make a code that will navigate to a page, after a specific date.
Eg: Before December 25 I want a page in my site to 'redirect' to lets say 'temp.htm', but after the 25 December has passed, it must go to 'homepage.htm'.

I want to try and use this for easy updating in Dec-Feb when I will have no Internet.

If any of you know how, please, share your wisdom!

Thanks Alot and happy holidays!!!:thumbsup: :)

Nov 24th, 2005, 11:20 AM
I think that this tutorial will help you.


Study this for a little while and see if you do want to do. If not come back with some of your sample code that you tried and I think someone should be able to help you fine tune it.

Nov 24th, 2005, 12:57 PM
sorry i posted in error, i was thinking about something else.. use the script KOR posted below.

Nov 24th, 2005, 01:27 PM
what about if the year changes?

better use Date() object for both dates

<script type="text/javascript">
var today = new Date()
var limitday = new Date(2005,11,25)