PDA

View Full Version : date range redirect script



rsines
09-20-2011, 01:14 PM
I want to write a simple page redirect script that would load one page if the date was between Sept 1 - Oct 10, and another page the rest of the time.

here is the code I've tried with errors up the gazoo!

<script type="text/javascript">
var today = new Date();
var daynum = today.getDOY();
function newLocation()
{
if daynum =>243 or daynum <=283 {window.location="this.htm"}
else {window.location="that.htm"}
}
</script>

any help with correcting this would be greatly appreciated, as you can see by the code I know zilch about javascript!