Prepare to smack yourself...
You're missing a closing brace after the document.write() statement after the third if-else statement!
today = new Date()
if ((today.getHours() >=4) && (today.getHours() <=12)){
document.write("Good Morning. Have a rush job for the afternoon? We can handle it!")
}
if ((today.getHours() >12) && (today.getHours() <=18)){
document.write("Good afternoon. We can get that print job ready by tomorrow morning.")
}
if ((today.getHours() >18) && (today.getHours() <=23)){
document.write("Good evening. We will be here all night if you need us!")
} // <--- here it is
if ((today.getHours() >=0) && (today.getHours() <4)){
document.write("Yes, we are working at this hour!")
}
-Snib
<><
Try new FreshView 0.2!
There are only two stupid questions: the one you don't ask, and the one you ask more than once ;)