Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Time-of-day based web design
Old 11-27-2008, 12:14 PM Time-of-day based web design
Junior Talker

Posts: 1
Name: S
Trades: 0
Hi all,

I need to build a website where the appearance/background image varies depending on the time of day (say, the user's computer clock). There'll only be a few variations: morning, afternoon, evening. Is this simple to do, and if so can anyone provide any insight to help me out?

Many thanks
dayton90 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-27-2008, 12:18 PM Re: Time-of-day based web design
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
CSS + Javascript style switching.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-27-2008, 02:08 PM Re: Time-of-day based web design
Super Moderator

Posts: 1,584
Location: Kokkola, Finland
Trades: 1
e.g. http://www.katgal.com/2007/03/time-s...er-change.html
davemies is offline
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 11-27-2008, 03:51 PM Re: Time-of-day based web design
jason_bristol's Avatar
Ultra Talker

Latest Blog Post:
New site - ConnectFrench.com
Posts: 312
Name: Jason Eyermann
Location: england bristol
Trades: 0
Here's some javascript I used for my company's (the company that I work for) site that changes the main image depending on what month it is

Code:
function mainImageFunction() {
	var d = new Date();
	
	var month = new Array(12);
	month[0] = "jan";
	month[1] = "feb";
	month[2] = "mar";
	month[3] = "apr";
	month[4] = "may";
	month[5] = "jun";
	month[6] = "jul";
	month[7] = "aug";
	month[8] = "sep";
	month[9] = "oct";
	month[10] = "nov";
	month[11] = "dec";
	
	var imageMonth = month[d.getMonth()];
	var mainImage = document.getElementById("mainImage");
	mainImage.style.background = "url(images/Months/" + imageMonth + ".jpg) no-repeat right bottom";
}
This is used on Rocket-media.co.uk

You can do something similar
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Last edited by jason_bristol; 11-27-2008 at 05:54 PM..
jason_bristol is offline
Reply With Quote
View Public Profile Visit jason_bristol's homepage!
 
Reply     « Reply to Time-of-day based web design
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.17647 seconds with 12 queries