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.

JavaScript Forum


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



Reply
Timer (that keeps counting down throughout the website)
Old 05-24-2011, 08:43 AM Timer (that keeps counting down throughout the website)
Novice Talker

Posts: 7
Trades: 0
Hi, I'm trying to include a cowntdown timer in my website. I've found JS scripts that do this but the problem is that I need the timer to keep timing down throughout browsing the website, and I have no idea how to store these variables. Does anybody know how to do this?

PS the site is in PHP, I wasn't sure which subforum was more appropriate for my request.
mussgr is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-24-2011, 12:19 PM Re: Timer (that keeps counting down throughout the website)
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
You'll have to use javascript for the actual real-time counting, but you're better off using php to store the time. Have it stored in a file or a database, your choice. When the page loads use php to calculate how much time is left and print that number into the javscript code, so the javascript counter starts from there.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is online now
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 05-24-2011, 01:02 PM Re: Timer (that keeps counting down throughout the website)
Novice Talker

Posts: 7
Trades: 0
Yeah but this way the "timestamp" would have to be stored once the user leaves the page, and I have no idea if this is possible. (At any rate thanks a lot lizciz, you've been very helpful this past couple days =))
mussgr is offline
Reply With Quote
View Public Profile
 
Old 05-24-2011, 01:19 PM Re: Timer (that keeps counting down throughout the website)
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.w3schools.com/JS/js_cookies.asp
__________________
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 online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Timer (that keeps counting down throughout the website)
 

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 0.73865 seconds with 12 queries