Reply LinkBack Thread Tools Search this Thread
Old 17-03-2007, 11:01   #1 (permalink)
brooks
inventer of the left-hand
 
brooks's Avatar
 
Join Date: Aug 2006
Location: Gypsyville
Posts: 1,317
Daily changing background? using javascript?

I'm currently re-doing my site and I've seen the method shown on digg the other day of altering the background to the time of the day but is there a way of using Javascript/PHP to alter the background for each day? I've found a couple of bits of code but they're messy as anything.

Thanks if you can help.
__________________
  Reply With Quote
Old 17-03-2007, 11:43   #2 (permalink)
d3mcfadden
Senior Member
 
d3mcfadden's Avatar
 
Join Date: Apr 2005
Location: -
Posts: 694
Send a message via AIM to d3mcfadden
PHP Code:
$days['Sunday'] = "image.jpg";
$days['Monday'] = "image.jpg";
$days['Tuesday'] = "image.jpg";
$days['Wednesday'] = "image.jpg";
$days['Thursday'] = "image.jpg";
$days['Friday'] = "image.jpg";
$days['Saturday'] = "image.jpg"
HTML Code:
<style type="text/css"> body { background: url(
PHP Code:
<?php echo $days[date("l")]; ?>
HTML Code:
); } </style>
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8