Jump to content

Creating a different page for each month


Recommended Posts

Here is my problem, I am trying to make it so each month it will show a different type of page, I have tried a number of things, and I feel like I got close to it on the last thing, but I am still not there. Here is the code i am trying to use, though I know that this will not work as I have tried it already:<code><html><head><script type="text/vbscript">Function Monthly()D=(Month(Date))If D = 4 then window.open "http://www.droppingthebomb.com/about_us.html"</script></head></html></code>This isn't exactly what I have in mind, I just used this part of the site to see if I could get it to work. So far I have come up with nothing but a blank screen. Please let me know a simple code if possible to solve this. I don't need it for every month, just one or two and I could probably figure the rest out. Thanks a lot. :)

Link to post
Share on other sites

Just change the urls for the following:

<script language="vbscript"><!--select case(month(now))	case 1  url = "http://www.droppingthebomb.com"	case 2  url = "http://www.google.no"	case 3  url = "http://www.google.co.uk"	case 4  url = "http://www.droppingthebomb.com"	case 5  url = "http://www.google.se"	case 6  url = "http://www.google.com"	case 7  url = "http://www.google.com"	case 8  url = "http://www.google.com"	case 9  url = "http://www.google.com"	case 10  url = "http://www.google.com"	case 11  url = "http://www.google.com"	case 12  url = "http://www.google.com"	case else  url = "http://www.yahoo.com"end select'document.write(url)location.href=url--></script>

Link to post
Share on other sites

Another way is to use an array:

<script language="vbscript"><!--	Dim url	url=array("http://www.google.no","http://www.google.co.uk","http://www.google.com","http://www.droppingthebomb.com","http://www.google.no","http://www.google.co.uk","http://www.google.com","http://www.droppingthebomb.com","http://www.google.no","http://www.google.co.uk","http://www.google.com","http://www.droppingthebomb.com")	location.href=url(month(now)-1)    'arrays begin at zero!--></script>

Link to post
Share on other sites

one more..

<script language="vbscript"><!--Dim dateArray(12)	dateArray(1)="http://www.google.no"	dateArray(2)="http://www.google.co.uk"	dateArray(3)="http://www.google.com"	dateArray(4)="http://www.droppingthebomb.com"	dateArray(5)="http://www.google.no"	dateArray(6)="http://www.google.co.uk"	dateArray(7)="http://www.google.no"	dateArray(8)="http://www.google.co.uk"	dateArray(9)="http://www.google.com"	dateArray(10)="http://www.droppingthebomb.com"	dateArray(11)="http://www.google.no"	dateArray(12)="http://www.google.co.uk"'document.write(dateArray(month(date)))location.href=dateArray(month(date))--></script>

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...