Avatar of superphonic

asked on 

Detailed javascript counter required

Hi all,

I have looked everywhere but am unable to find a countdown script that does what I am after. The script is for a auction site, and needs to count down in days, hours, minutes and seconds. I need to be able to place multiple (up to 30) countdown timers on one page, each counting down to a different date when the auction closes. I need to be able to simply place a div where I want the countdown to go, for example <div class="styling" id="unique_auction_ID"></div>. I need the countdown to use the server time, which I can populate into the html when it is outputed by php. I have seen the following on another auction site:

<div class="timeleftBig" id="auction3210"></div>

<script type="text/javascript">
var auction_time3210 = new cbCounter("auction3210", "auction_time3210", "July 21, 2008 00:42:42", "July 23, 2008 14:00:00", "", "Auction Closed")

<div class="timeleftBig" id="auction3211"></div>

<script type="text/javascript">
var auction_time3211 = new cbCounter("auction3211", "auction_time3210", "July 21, 2008 00:42:42", "July 26, 2008 12:00:00", "", "Auction Closed")

etc... for each auction. I can see in the cbcounter, the first variable is the name of the div to place the counter, not sure what the second is, the third in the server time when the page was loaded, the forth is the date and time to count down to, and the fith is the text to display when the count down has finished. I basically need the backend javascript that will make the above code work. like I say I have no problem populating the various variables in the scrips above, its just the javascript that I need. I don't know javascript at all.

Any help very welcome. Thanks
Web Languages and StandardsJScriptAJAX

Avatar of undefined
Last Comment

8/22/2022 - Mon