Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
Share
LinkBack Thread Tools
Old 05-06-2012, 01:35 PM   #1
PreSposure.com
Registered Member
 
Dennisknows's Avatar
 
Join Date: Jun 2011
Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to Dennisknows
Default How To Create A countdown

Can someone please show me how to create a simple countdown for one of my landing pages...

What I'm trying to do is make a number like 102.3 (seconds.milliseconds) countdown to zero. I want it to start over for every visitor.

Just looking for regular text.. Nothing fancy..

I've been trying to find this script for a long time now (on and off a year) but can't come across what I need; not even with Google..

If it's some type of secret industry script, please email me about it..

I greatly appreciate it..

We don't sell views! We sell EXPOSURE!!
Dennisknows is offline   Reply With Quote
Old 05-06-2012, 02:30 PM   #2
Advanced Warrior
War Room Member
 
Brandon Tanner's Avatar
 
Join Date: Jul 2006
Location: USA
Posts: 2,470
Thanks: 160
Thanked 1,074 Times in 490 Posts
Default Re: How To Create A countdown

What you're looking for is a Javascript countdown timer. If you Google it you'll find tons of choices and code examples.

FYI, a tenth of a second (as in your example) is called a decisecond. A millisecond would be like 102.3000, which would be extremely processor-intensive to count down and would probably crash most (if not all) of your visitor's browsers.

I would just use seconds if I were you. Any greater resolution than that, and you start risking potential browser/display issues with your visitors who are on slower connections.

Brandon Tanner is online now   Reply With Quote
Old 05-06-2012, 02:59 PM   #3
PreSposure.com
Registered Member
 
Dennisknows's Avatar
 
Join Date: Jun 2011
Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to Dennisknows
Default Re: How To Create A countdown

Learn something new everyday. I've done tons of searches but I don't think I searched for that exactly..

Thanks Brandon..

I'll get on it...

We don't sell views! We sell EXPOSURE!!
Dennisknows is offline   Reply With Quote
Old 05-06-2012, 05:08 PM   #4
HyperActive Warrior
War Room Member
 
dbwebhosting's Avatar
 
Join Date: Mar 2012
Location: London
Posts: 429
Thanks: 5
Thanked 27 Times in 27 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile 
Default Re: How To Create A countdown

Javascript can do this, it will reset every time a user refreshes the page though

Lets Us Do Your Back linking >>> The Best SENuke X Campaign <<< Panda and Penguin friendly

Cheap Web Hosting £2.49 per month
Solar Energy
Black Ops 2
dbwebhosting is offline   Reply With Quote
Old 05-06-2012, 05:34 PM   #5
Active Warrior
 
Join Date: Feb 2012
Posts: 35
Thanks: 7
Thanked 0 Times in 0 Posts
Default Re: How To Create A countdown

Quote:
Originally Posted by dbwebhosting View Post
Javascript can do this, it will reset every time a user refreshes the page though
I'm not sure if it's useful to OP either way, but it doesn't have restart every visit if you know how to use the javascript cookies plugin.
johndoejohndoe is offline   Reply With Quote
Old 05-06-2012, 08:10 PM   #6
PreSposure.com
Registered Member
 
Dennisknows's Avatar
 
Join Date: Jun 2011
Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to Dennisknows
Default Re: How To Create A countdown

Quote:
Originally Posted by johndoejohndoe View Post
I'm not sure if it's useful to OP either way, but it doesn't have restart every visit if you know how to use the javascript cookies plugin.
I don't know anything about Javascript.. This is the dilemma I've been dealing with off and on for close to a year now...

It's been like a bad relationship; only if I get this one right, it will make me money instead of take it away...

I've found tons of scripts on timers and I can do those but all of them have to the date in them and i don't know enough about Javascript to edit it...

I'm starting to get the feeling that the javascript countdown I'm looking for in particular costs a lot of money....

We don't sell views! We sell EXPOSURE!!
Dennisknows is offline   Reply With Quote
Old 05-06-2012, 08:43 PM   #7
Advanced Warrior
War Room Member
 
Brandon Tanner's Avatar
 
Join Date: Jul 2006
Location: USA
Posts: 2,470
Thanks: 160
Thanked 1,074 Times in 490 Posts
Default Re: How To Create A countdown

Dennis, check this out... it counts down by seconds only...

Countdown to extra profits -- Ask Michel Komarov

Brandon Tanner is online now   Reply With Quote
Old 05-06-2012, 08:44 PM   #8
PreSposure.com
Registered Member
 
Dennisknows's Avatar
 
Join Date: Jun 2011
Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to Dennisknows
Default How does Javascript work?

Am I suppose to paste the countdown javascript code in a FILENAME.js file and then paste the "src=site.com/FILENAME.js" in the PHP coding?

or

can I just paste it in my PHP coding?

We don't sell views! We sell EXPOSURE!!
Dennisknows is offline   Reply With Quote
Old 05-06-2012, 08:59 PM   #9
PreSposure.com
Registered Member
 
Dennisknows's Avatar
 
Join Date: Jun 2011
Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to Dennisknows
Default Re: How To Create A countdown

Quote:
Originally Posted by Brandon Tanner View Post
Dennis, check this out... it counts down by seconds only...

Countdown to extra profits -- Ask Michel Komarov
Brandon my man that was it.. Took me a minute of playing around with it but I got it working.. Now Im going to tweak it a bit..

I'm saving that script to my evernote so I can have it available at all times..

Thanks again man.. You really helped me out a lot with that..

We don't sell views! We sell EXPOSURE!!
Dennisknows is offline   Reply With Quote
Old 05-06-2012, 09:39 PM   #10
Advanced Warrior
War Room Member
 
Brandon Tanner's Avatar
 
Join Date: Jul 2006
Location: USA
Posts: 2,470
Thanks: 160
Thanked 1,074 Times in 490 Posts
Default Re: How To Create A countdown

No worries... glad I could help!

Brandon Tanner is online now   Reply With Quote
Old 05-07-2012, 10:53 PM   #11
Web Developer
 
Join Date: Mar 2011
Location: Ontario, Canada
Posts: 192
Thanks: 16
Thanked 25 Times in 24 Posts
Social Networking View Member's Twitter Profile  View Member's YouTube Profile
Default Re: How To Create A countdown

Hi Dennis,

have you checked this: jQuery Plugin: jQuery Countdown

lordspace is offline   Reply With Quote
Old 05-08-2012, 06:29 PM   #12
100% Warrior
War Room Member
 
webpeon's Avatar
 
Join Date: Jan 2012
Location: New Zealand
Posts: 551
Blog Entries: 2
Thanks: 72
Thanked 66 Times in 61 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile 
Contact Info
Send a message via Skype™ to webpeon
Default Re: How To Create A countdown

Quote:
Originally Posted by Brandon Tanner View Post
FYI, a tenth of a second (as in your example) is called a decisecond.
Looks like I learnt something new today, its interesting I just learnt the other day that "jiffy" is actually a measurement as well, not just the slang ive always thought it to be.
webpeon is offline   Reply With Quote
Old 05-09-2012, 02:52 AM   #13
Warrior Member
 
Join Date: May 2012
Posts: 15
Thanks: 0
Thanked 5 Times in 4 Posts
Default Re: How To Create A countdown

Hello,

I made a small javascript snippet, that may do what you want... or at least what I understand you want
However it may "force" the browser a bit, but it should be fine.

HTML Code:
<script>
milliseconds = 200 * 1000;  //countdown length

first = new Date().getTime();     
function start_cd()
{
     now = new Date().getTime() - first;
     document.getElementById('timer').innerHTML = Math.round((milliseconds - now)/1000*1000)/1000;
    
     if (milliseconds - now > 0)
             setTimeout("start_cd()", 1);

     
}
</script>

<body onLoad="start_cd();">
<div id="timer">
</div>
</body>
TheApex is online now   Reply With Quote
Old 05-11-2012, 07:11 AM   #14
Banned
 
Join Date: Apr 2012
Posts: 47
Thanks: 0
Thanked 2 Times in 2 Posts
Default Re: How To Create A countdown

In order to create a countdown timer in JavaScript you'll have to use the window.setTimeout function which will call a JavaScript function after a certain amount of time.
brandonthomas is offline   Reply With Quote
Old 05-11-2012, 08:37 PM   #15
Premium SEO Company
War Room Member
 
System Wide Solutions's Avatar
 
Join Date: Sep 2009
Posts: 421
Thanks: 53
Thanked 40 Times in 29 Posts
Default Re: How To Create A countdown

Javascript count doen is the best solution. you can create very attractive ones.

System Wide Solutions is offline   Reply With Quote
Old 05-13-2012, 05:58 AM   #16
Code Addicted
 
ivankristianto's Avatar
 
Join Date: May 2011
Location: Jakarta
Posts: 19
Thanks: 2
Thanked 3 Times in 3 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Yahoo to ivankristianto Send a message via Skype™ to ivankristianto
Default Re: How To Create A countdown

Give me your email, then i can email you my wordpress plugin for countdown.
ivankristianto is offline   Reply With Quote
Old 05-13-2012, 09:11 AM   #17
PreSposure.com
Registered Member
 
Dennisknows's Avatar
 
Join Date: Jun 2011
Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to Dennisknows
Default Re: How To Create A countdown

Quote:
Originally Posted by ivankristianto View Post
Give me your email, then i can email you my wordpress plugin for countdown.
Ok.. Sending you a pm and a friend request now.. Thanks

Quote:
Originally Posted by System Wide Solutions View Post
Javascript count doen is the best solution. you can create very attractive ones.
I guess I need to study JavaScript because I see that it is very valuable to Internet marketing. What's a good way to get started in learning JavaScript if anyone knows any

We don't sell views! We sell EXPOSURE!!
Dennisknows is offline   Reply With Quote
Old 05-13-2012, 10:56 AM   #18
Advanced Warrior
War Room Member
 
Brandon Tanner's Avatar
 
Join Date: Jul 2006
Location: USA
Posts: 2,470
Thanks: 160
Thanked 1,074 Times in 490 Posts
Default Re: How To Create A countdown

Quote:
Originally Posted by Dennisknows View Post
I guess I need to study JavaScript because I see that it is very valuable to Internet marketing. What's a good way to get started in learning JavaScript if anyone knows any
Yeah... Javascript is pretty cool. Just keep in mind that a small percentage (~ 1-2%) of your website visitors will have JS disabled in their browser, so you don't want to rely on JS for anything that is "mission critical". But for all other uses, it's fine.

That said, I think Tizag has excellent tutorials for beginners...

Javascript Tutorial - Intro

W3Schools also has good tutorials...

JavaScript Tutorial

Brandon Tanner is online now   Reply With Quote
Old 05-15-2012, 01:55 AM   #19
Code Addicted
 
ivankristianto's Avatar
 
Join Date: May 2011
Location: Jakarta
Posts: 19
Thanks: 2
Thanked 3 Times in 3 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Yahoo to ivankristianto Send a message via Skype™ to ivankristianto
Default Re: How To Create A countdown

Hi Dennis,
since i cannot send pm (because my post is not 50 yet).
can you send me your email instead?
i will send it to your email.

Quote:
Originally Posted by Dennisknows View Post
Ok.. Sending you a pm and a friend request now.. Thanks



I guess I need to study JavaScript because I see that it is very valuable to Internet marketing. What's a good way to get started in learning JavaScript if anyone knows any
ivankristianto is offline   Reply With Quote
Old 05-15-2012, 02:28 PM   #20
Shantanu
 
shantanu's Avatar
 
Join Date: Aug 2011
Location: New Delhi
Posts: 253
Thanks: 4
Thanked 15 Times in 15 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Default Re: How To Create A countdown

Easy way to get rid of this **** >> MAKE YOUR OWN COUNTER

Alternative Solution To This Problem

shantanu is offline   Reply With Quote
Old 05-15-2012, 07:12 PM   #21
Warrior Member
 
Join Date: May 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: How To Create A countdown

You can either use flash or php to make count down, according to me flash countdown is better
designdon is offline   Reply With Quote
Old 05-16-2012, 06:48 AM   #22
HyperActive Warrior
 
jewelraz's Avatar
 
Join Date: Mar 2012
Posts: 181
Thanks: 47
Thanked 5 Times in 5 Posts
Default Re: How To Create A countdown

I will try with this keyword "Javascript countdown timer", I was also thinking about it.... I might need it if I move my site to another server.

jewelraz is offline   Reply With Quote
Old 07-21-2012, 06:15 AM   #23
Active Warrior
War Room Member
 
thesilvershield's Avatar
 
Join Date: Feb 2012
Location: Turkey
Posts: 83
Thanks: 76
Thanked 7 Times in 5 Posts
Default Re: How To Create A countdown

Quote:
Originally Posted by Brandon Tanner View Post
Dennis, check this out... it counts down by seconds only...

Countdown to extra profits -- Ask Michel Komarov
I've been looking for such a countdown timer the whole day! Thanks a lot! The post you linked definitely solved my problem too!
thesilvershield is offline   Reply With Quote
Old 07-21-2012, 06:53 AM   #24
HyperActive Warrior
 
xbluelinks's Avatar
 
Join Date: Jul 2012
Posts: 110
Thanks: 3
Thanked 8 Times in 7 Posts
Default Re: How To Create A countdown

If you are using Wordpress, you may want to consider using Wordpress Countdown Plugins.

Here are a few good ones:
xbluelinks is offline   Reply With Quote
Old 07-22-2012, 05:10 AM   #25
HyperActive Warrior
 
Join Date: Jul 2012
Posts: 198
Thanks: 0
Thanked 14 Times in 14 Posts
Default Re: How To Create A countdown

To create a countdown on your landing page then you have to do it with javascript and to do that you need to have proper knowledge and skill about programming language.
jaasmit is offline   Reply With Quote
Old 07-24-2012, 09:27 AM   #26
Wordpress Master
 
oknoorap's Avatar
 
Join Date: Jul 2010
Location: Asia
Posts: 68
Thanks: 1
Thanked 4 Times in 4 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile 
Contact Info
Send a message via Skype™ to oknoorap
Default Re: How To Create A countdown

do you familiar with jQuery framework?, if you familiar then PM me (sorry but, I can't sit down everyday in front of my laptop)

Just Web Developer.
oknoorap is offline   Reply With Quote
Old 07-25-2012, 12:38 PM   #27
Banned
 
Join Date: Apr 2012
Posts: 402
Thanks: 0
Thanked 28 Times in 28 Posts
Default Re: How To Create A countdown

Can you put PHP or java on your site? If you can use java then try that. It should be real easy to make one that is constantly ticking down. Also, you can probably make one in flash. I know for a fact you could do one in PHP but it wouldn't tick down constantly, only when the page was refreshed. Try searching google for a premade one.
antac is offline   Reply With Quote
Old 07-25-2012, 08:40 PM   #28
Graphics, PHP, .Net, Html
War Room Member
 
WebdevelopmentGroup's Avatar
 
Join Date: Mar 2011
Location: New York, NY
Posts: 1,700
Thanks: 164
Thanked 137 Times in 99 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to WebdevelopmentGroup
Default Re: How To Create A countdown

Are you looking for something like this:

LaunchSoon Demo

WebDevelopmentGroup NYC & CA- Small Business Web Development, App Development, WordPress Development, Graphic Designs, Online Marketing, Local Marketing & more!. "Call us 1.800.219.1314 or message us!". Visit us today! "Now On Live Chat Mon-Fri.". www.WebDevelopmentGroup.org
WebdevelopmentGroup is offline   Reply With Quote
Old 07-26-2012, 01:53 AM   #29
Advanced Warrior
 
Join Date: Apr 2012
Location: Bangladesh
Posts: 697
Thanks: 0
Thanked 49 Times in 47 Posts
Social Networking View Member's Twitter Profile 
Contact Info
Send a message via Skype™ to mmrumii
Default Re: How To Create A countdown

Here i have shared a link where you can find your solution.
you can create countdown by using javascript.

http://www.google.com/url?sa=t&rct=j...hObk6vsTfjky0w

mmrumii is offline   Reply With Quote
Old 07-27-2012, 03:18 AM   #30
Warrior Member
 
Join Date: Jun 2012
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: How To Create A countdown

Use the following code.

Code:
<script language="JavaScript">

//Refresh page script- By Brett Taylor (glutnix@yahoo.com.au)
//Modified by Dynamic Drive for NS4, NS6+
//Visit http://www.dynamicdrive.com for this script

//configure refresh interval (in seconds)
var countDownInterval=60;
//configure width of displayed text, in px (applicable only in NS4)
var c_reloadwidth=200

</script>


<ilayer id="c_reload" width=&{c_reloadwidth}; ><layer id="c_reload2" width=&{c_reloadwidth}; left=0 top=0></layer></ilayer>

<script>

var countDownTime=countDownInterval+1;
function countDown(){
countDownTime--;
if (countDownTime <=0){
countDownTime=countDownInterval;
clearTimeout(counter)
window.location.reload()
return
}
if (document.all) //if IE 4+
document.all.countDownText.innerText = countDownTime+" ";
else if (document.getElementById) //else if NS6+
document.getElementById("countDownText").innerHTML=countDownTime+" "
else if (document.layers){ //CHANGE TEXT BELOW TO YOUR OWN
document.c_reload.document.c_reload2.document.write('Next <a href="javascript:window.location.reload()">refresh</a> in <b id="countDownText">'+countDownTime+' </b> seconds')
document.c_reload.document.c_reload2.document.close()
}
counter=setTimeout("countDown()", 1000);
}

function startit(){
if (document.all||document.getElementById) //CHANGE TEXT BELOW TO YOUR OWN
document.write('Next <a href="javascript:window.location.reload()">refresh</a> in <b id="countDownText">'+countDownTime+' </b> seconds')
countDown()
}

if (document.all||document.getElementById)
startit()
else
window.onload=startit

</script>

ubaid12j is offline   Reply With Quote
Old 08-14-2012, 02:48 AM   #31
Warrior Member
War Room Member
 
markmotts's Avatar
 
Join Date: Jun 2009
Location: Basingstoke, UK
Posts: 24
Thanks: 29
Thanked 5 Times in 5 Posts
Default Re: How To Create A countdown

Hey Gang - Do you know of a countdown timer solution that will work within a WSO post?

markmotts is offline   Reply With Quote
Old 08-14-2012, 08:20 AM   #32
Advanced Warrior
War Room Member
 
Brandon Tanner's Avatar
 
Join Date: Jul 2006
Location: USA
Posts: 2,470
Thanks: 160
Thanked 1,074 Times in 490 Posts
Default Re: How To Create A countdown

Quote:
Originally Posted by markmotts View Post
Hey Gang - Do you know of a countdown timer solution that will work within a WSO post?
Not possible, as you can't insert (working) HTML or Javascript into WF posts.

Brandon Tanner is online now   Reply With Quote
Old 12-21-2012, 08:07 AM   #33
Warrior Member
 
Join Date: Apr 2011
Location: Moldova
Posts: 12
Thanks: 9
Thanked 2 Times in 1 Post
Default Re: How To Create A countdown

Quote:
Originally Posted by Brandon Tanner View Post
Dennis, check this out... it counts down by seconds only...

Countdown to extra profits -- Ask Michel Komarov
Thanks a lot for this !!
Hugo89 is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Bookmarks

Tags
countdown, create, script

Thread Tools

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



All times are GMT -6. The time now is 01:49 PM.