471,055 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,055 software developers and data experts.

page loading

Hi!

Is there a way to load a page based on the date in JavaScript or do I
need the full functionality of JAVA to do this. I'm trying to create an auto
website that would adjust the homepage according to the day of month or
year. Any suggestions before I embark? I do have experience in c++
programming from years ago and some java-as-required knowledge.

Jerry
Jul 20 '05 #1
1 2312
"Jerry" <jb*****@cogeco.ca> writes:
Is there a way to load a page based on the date in JavaScript or do I
need the full functionality of JAVA to do this.


Javascript can do it.

var today = new Date();
location.href = "pageForDate"+today.getDate()+".html";

This will switch the page to "pageForDate1.html" on the first,
"pageForDate2.html" on the second etc.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Patrick Olurotimi Ige | last post: by
5 posts views Thread by Peter Rilling | last post: by
7 posts views Thread by UJ | last post: by
1 post views Thread by John Smith | last post: by
4 posts views Thread by Tim | last post: by
3 posts views Thread by The alMIGHTY N | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.