I am developing a site and have been told based on the certain month we want to direct users to month specific pages. January will go to January.html, for example, February to February.html. I have created the following script and for some reason cannot redirect the page.
Any help would be greatly appreciated! Thanks, Nick
<p><script type="text/javascript">
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++)
this[i+1] = initArray.arguments[i];
}
var MonthArray = new;
initArray("January","February","March","April","May","June","July","July","August",
"Septemb er","October","November","December");
var today = new Date();
var m = MonthArray[today.getMonth()+1];
var currentDate = new Date().getDate();
if (currentDate == 1)
window.location = "CORPORATE.COM WEBSITE/folder/january.html";
if (currentDate == 2))
window.location = "CORPORATE.COM WEBSITE/folder/february.html";
if (currentDate == 3))
window.location = "CORPORATE.COM WEBSITE/folder/march.html";
if (currentDate == 4))
window.location = "CORPORATE.COM WEBSITE/folder/april.html";
if (currentDate == 5))
window.location = "CORPORATE.COM WEBSITE/folder/may.html";
if (currentDate == 6))
window.location = "CORPORATE.COM WEBSITE/folder/june.html";
if (currentDate == 7))
window.location = "CORPORATE.COM WEBSITE/folder/july.html";
if (currentDate == 8))
window.location = CORPORATE.COM WEBSITE/folder/august.html";
if (currentDate == 9))
window.location = "CORPORATE.COM WEBSITE/folder/september.html";
if (currentDate == 10))
window.location = "CORPORATE.COM WEBSITE/folder/october.html";
if (currentDate == 11))
window.location = "CORPORATE.COM WEBSITE/folder/november.html";
if (currentDate == 12))
window.location = "CORPORATE.COM WEBSITE/folder/december.html";
</script></p>