![]() | ![]() | ||||||||
| | #1 |
| PreSposure.com Registered Member Join Date: Jun 2011 Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
|
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!! >> PreSposure.com << | |
| | |
| | #2 |
| Advanced Warrior War Room Member Join Date: Jul 2006 Location: USA
Posts: 2,470
Thanks: 160
Thanked 1,074 Times in 490 Posts
|
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. |
| | |
| | |
| | #3 |
| PreSposure.com Registered Member Join Date: Jun 2011 Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
|
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!! >> PreSposure.com << | |
| | |
| | #4 |
| HyperActive Warrior War Room Member Join Date: Mar 2012 Location: London
Posts: 429
Thanks: 5
Thanked 27 Times in 27 Posts
|
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 Solar EnergyCheap Web Hosting £2.49 per month Black Ops 2 | |
| | |
| | #5 |
| Active Warrior Join Date: Feb 2012
Posts: 35
Thanks: 7
Thanked 0 Times in 0 Posts
| |
| | |
| | #6 | |
| PreSposure.com Registered Member Join Date: Jun 2011 Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
| Quote:
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!! >> PreSposure.com << | ||
| | |
| | #7 |
| Advanced Warrior War Room Member Join Date: Jul 2006 Location: USA
Posts: 2,470
Thanks: 160
Thanked 1,074 Times in 490 Posts
|
Dennis, check this out... it counts down by seconds only... Countdown to extra profits -- Ask Michel Komarov |
| | |
| | |
| | #8 |
| PreSposure.com Registered Member Join Date: Jun 2011 Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
|
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!! >> PreSposure.com << | |
| | |
| | #9 | |
| PreSposure.com Registered Member Join Date: Jun 2011 Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
| Quote:
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!! >> PreSposure.com << | ||
| | |
| | #10 |
| Advanced Warrior War Room Member Join Date: Jul 2006 Location: USA
Posts: 2,470
Thanks: 160
Thanked 1,074 Times in 490 Posts
|
No worries... glad I could help!
|
| | |
| | |
| | #11 |
| Web Developer Join Date: Mar 2011 Location: Ontario, Canada
Posts: 192
Thanks: 16
Thanked 25 Times in 24 Posts
| |
| | |
| | |
| | #13 |
| Warrior Member Join Date: May 2012
Posts: 15
Thanks: 0
Thanked 5 Times in 4 Posts
|
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> |
| | |
| | #14 |
| Banned Join Date: Apr 2012
Posts: 47
Thanks: 0
Thanked 2 Times in 2 Posts
|
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.
|
| | |
| | #15 |
| Premium SEO Company War Room Member Join Date: Sep 2009
Posts: 421
Thanks: 53
Thanked 40 Times in 29 Posts
|
Javascript count doen is the best solution. you can create very attractive ones.
|
| | SEO Consultant | Shane Hunter | | |
| | |
| | #16 |
| Code Addicted Join Date: May 2011 Location: Jakarta
Posts: 19
Thanks: 2
Thanked 3 Times in 3 Posts
|
Give me your email, then i can email you my wordpress plugin for countdown.
|
| | |
| | #17 | |
| PreSposure.com Registered Member Join Date: Jun 2011 Location: In my signature
Posts: 317
Thanks: 123
Thanked 75 Times in 61 Posts
| Quote:
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!! >> PreSposure.com << | ||
| | |
| | #18 | |
| Advanced Warrior War Room Member Join Date: Jul 2006 Location: USA
Posts: 2,470
Thanks: 160
Thanked 1,074 Times in 490 Posts
| Quote:
That said, I think Tizag has excellent tutorials for beginners... Javascript Tutorial - Intro W3Schools also has good tutorials... JavaScript Tutorial | |
| | ||
| | |
| | #19 |
| Code Addicted Join Date: May 2011 Location: Jakarta
Posts: 19
Thanks: 2
Thanked 3 Times in 3 Posts
|
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. |
| | |
| | #20 |
| Shantanu Join Date: Aug 2011 Location: New Delhi
Posts: 253
Thanks: 4
Thanked 15 Times in 15 Posts
| |
| | |
| | |
| | #21 |
| Warrior Member Join Date: May 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
You can either use flash or php to make count down, according to me flash countdown is better
|
| | |
| | #22 |
| HyperActive Warrior Join Date: Mar 2012
Posts: 181
Thanks: 47
Thanked 5 Times in 5 Posts
|
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.
|
| | |
| | |
| | #23 | |
| Active Warrior War Room Member Join Date: Feb 2012 Location: Turkey
Posts: 83
Thanks: 76
Thanked 7 Times in 5 Posts
| Quote:
| |
| | |
| | #24 |
| HyperActive Warrior Join Date: Jul 2012
Posts: 110
Thanks: 3
Thanked 8 Times in 7 Posts
|
If you are using Wordpress, you may want to consider using Wordpress Countdown Plugins. Here are a few good ones: |
| | |
| | #25 |
| HyperActive Warrior Join Date: Jul 2012
Posts: 198
Thanks: 0
Thanked 14 Times in 14 Posts
|
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.
|
| | |
| | #26 |
| Wordpress Master Join Date: Jul 2010 Location: Asia
Posts: 68
Thanks: 1
Thanked 4 Times in 4 Posts
|
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.
| |
| | |
| | #27 |
| Banned Join Date: Apr 2012
Posts: 402
Thanks: 0
Thanked 28 Times in 28 Posts
|
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.
|
| | |
| | #28 |
| Graphics, PHP, .Net, Html War Room Member Join Date: Mar 2011 Location: New York, NY
Posts: 1,700
Thanks: 164
Thanked 137 Times in 99 Posts
| |
| 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 | |
| | |
| | #29 |
| Advanced Warrior Join Date: Apr 2012 Location: Bangladesh
Posts: 697
Thanks: 0
Thanked 49 Times in 47 Posts
|
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 |
| | |
| | |
| | #30 |
| Warrior Member Join Date: Jun 2012
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
|
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> |
| | |
| | |
| | #31 |
| Warrior Member War Room Member Join Date: Jun 2009 Location: Basingstoke, UK
Posts: 24
Thanks: 29
Thanked 5 Times in 5 Posts
|
Hey Gang - Do you know of a countdown timer solution that will work within a WSO post?
|
|
Mark - Software 4 Profits Kindle Answers Software - Research & Promotion | |
| | |
| | #32 |
| Advanced Warrior War Room Member Join Date: Jul 2006 Location: USA
Posts: 2,470
Thanks: 160
Thanked 1,074 Times in 490 Posts
| |
| | |
| | |
| | #33 | |
| Warrior Member Join Date: Apr 2011 Location: Moldova
Posts: 12
Thanks: 9
Thanked 2 Times in 1 Post
| Quote:
| |
| | |
![]() |
|
| Bookmarks |
| Tags |
| countdown, create, script |
| Thread Tools | |
| |
![]() |