Forum Moderators: open
<script type="text/javascript">
now = new Date();
hour = now.getHours();
if(hour>18) { txt = "Good Evening"; }
else if(hour>12) { txt = "Good Afternoon"; }
else if(hour>3) { txt = "Good Morning"; }
else { txt = "Welcome"; }
document.write(txt);
</script>
Of course you can change the txt value to be whatever you want... I think you get how it works :)
<added> A server side solution is, of course, prefered. But, then you always run into problems with figuring out which time zone the person is in :( </added>
I think three time slots will be fine. This is for a radio station with a regional audience so the time zone factor isn't much of an issue.
This is another stupid question, but how can I change the link the visitor goes to but not the image they click to get there? I'm far better at graphic design than coding... :)