Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Date redirection

Posted 05 Apr 2004 18:26:59
1
has voted
05 Apr 2004 18:26:59 Stefan P posted:
I need a script that directs users to one page before a given date and to another page after that date. It needs to be a client side script as I am using it on a CD rom.

Thanks

Stefan

DMX | ASP | VBScript | ACCESS | IIS5

Replies

Replied 22 Apr 2004 17:58:34
22 Apr 2004 17:58:34 Stefan P replied:
What I'm trying to do is redirect such that:

if the date is before 1 July 2004 then go to page1.htm

else if the date is after 1 July 2004 then go to page2.htm

Any suggestions.

Thanks

Stefan



Edited by - sesame on 27 Apr 2004 18:27:01
Replied 10 May 2004 19:18:12
10 May 2004 19:18:12 Stefan P replied:
Any takers?

DMX | ASP | VBScript | ACCESS | IIS5
Replied 11 May 2004 00:59:25
11 May 2004 00:59:25 Phil Shevlin replied:
Replied 11 May 2004 10:49:05
11 May 2004 10:49:05 Stefan P replied:
Thanks for this Phil, but like I said, it's a date based script I need as opposed to one that redirects based on the date of the week

DMX | ASP | VBScript | ACCESS | IIS5
Replied 11 May 2004 13:54:28
11 May 2004 13:54:28 Phil Shevlin replied:
Well what do you have so far?
Replied 11 May 2004 19:48:30
11 May 2004 19:48:30 Dave Thomas replied:
phil you had news of your moderator stuff yet?

i'ver tried to email, but i don't know for sure if your recieving it m8

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 12 May 2004 01:46:10
12 May 2004 01:46:10 Phil Shevlin replied:
Replied 12 May 2004 15:43:55
12 May 2004 15:43:55 Stefan P replied:
I amended a script and came up with:

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Ronnie T. Moore -->
<!-- Web Site: The JavaScript Source -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! javascript.internet.com -->

function launchCheck() {
var today = new Date(); // today
var date = new Date("June 1, 2004"; // your launch date

if (today.getTime() > date.getTime()) { // on or after launch date
window.location.href='www.microsoft.com';
}
else { // before launch date
window.location.href='www.google.com';
}
}

launchCheck();

</script>

Works just fine!

DMX | ASP | VBScript | ACCESS | IIS5

Edited by - sesame on 12 May 2004 15:44:34

Reply to this topic