Belzar Posted April 13, 2006 Share Posted April 13, 2006 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 comment Share on other sites More sharing options...
vinphetamin Posted April 13, 2006 Share Posted April 13, 2006 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 comment Share on other sites More sharing options...
vinphetamin Posted April 13, 2006 Share Posted April 13, 2006 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 comment Share on other sites More sharing options...
vinphetamin Posted April 13, 2006 Share Posted April 13, 2006 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 comment Share on other sites More sharing options...
Belzar Posted April 14, 2006 Author Share Posted April 14, 2006 Great, thanks a lot for all the tips, I'll try them all out Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now