![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: May 2005
Posts: 20
Rep Power: 0
![]() |
i was wondering if you could make a script that when it's day i have a light background on my page and when it's night i get a dark backgorund
so something that gets trigered by the time so from 6am to 8pm it's light then from 8pm back to 6am it's dark could this be possible like changing the background picture or something ![]() |
|
|
|
|
|
#2 | |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
Quote:
. |
|
|
|
|
|
|
#3 |
|
Expert Programmer
|
I know it's possible, but not sure how. There are functions of course to get the time of the user, and according to that time you should be able to change the page however you want.
|
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Change the background color of whatever element you like. I presume, possibly incorrectly, you're talking HTML page.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 | |
|
Newbie
Join Date: May 2005
Posts: 20
Rep Power: 0
![]() |
Quote:
webpage lolmore info : well say i had a clock on my page or it goes by computer user time when it reaches the right time it will should different backgrounds and things of the page different possible if so just post the code i'm a computer wiz i no wot i'm doing lol ![]() |
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() |
If you are a computer wiz you should be able to work it out?
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
|
|
#7 |
|
Newbie
Join Date: May 2005
Posts: 20
Rep Power: 0
![]() |
i'm good at computers but i hate javascript programing cos i get stressed with it so i want help DUR!! i good at other programming but not java
|
|
|
|
|
|
#8 |
|
Programming Guru
![]() |
The other thing was dont cross post.
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
|
|
#9 |
|
Newbie
Join Date: May 2005
Posts: 20
Rep Power: 0
![]() |
Hey people i've got a code now that works very well it uses your computer clock for timeing
Code: <script language="JavaScript"> <!-- var now = new Date( ); var hour = now.getHours( ); if (hour >= 4 && hour <= 18) { document.bgColor = "#6699cc"; } else { document.bgColor = "#000066"; } //--> </script> |
|
|
|
|
|
#10 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
We all knew a self-proclaimed wiz was just testing us. Wasn't too stressful now, was it?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|