codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  display new url each day  Archive Import (bob1975) at 01:06 on Sunday, May 18, 2003
 

I found a simple script that displays a different url each day of the week.

Monday=1.htm
Tuesday=2.htm
...
Sunday=7.htm

I need a similar script that will display a different url on each day of the year.

Day1=1.htm
Day2=2.htm
...
Day365=365.htm

Here`s the script:

<script language="JavaScript">
function GetTodaysURL()
{
var locationlist = new URLList
(
"1.html", // Monday
"2.html", // Tuesday
"3.html",
"4.html",
"5.html",
"6.html",
"7.html" // Sunday
);

now = new Date();
num = now.getDay();
if (num == 0) num = 7;

location.href = locationlist.list[num-1];
}

function URLList ()
{
var argv = URLList.arguments;
var argc = argv.length;
this.list = new Object();
for (var i = 0; i < argc; i++)
this.list = argv;
this.count = argc;
return this;
}
</script>
</head>
<body>
<a href="java script:GetTodaysURL()">java script:GetTodaysURL()</a>
</body>
</html>



  Re: display new url each day  Elain at 14:26 on Wednesday, October 27, 2010
 

I think iit is a good way to display url。Thank you share it with us!
-------------------------------------------------
http://www.sothink.com/product/swfeasy/
http://www.dhtml-menu-builder.com/
http://www.menu-flash.com








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: checkbox verification..headache!!
•  Re: FREE dating software worth over $350 for free
•  Re: button software
•  Re: never mind
•  Re: Blocking Key Press
•  Can anyone help me with c++ code?
•  Re: Great Site - Made my day!
•  Re: display new url each day
•  Re: adding sound to this reflex game


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010