02-29-2012, 10:55 AM
Thanks for clicking on the link and i presume while you are here on my thread yo u will try to help me
So here is the situation. I am building webpage that displays a clock , a ticker box and a countdown(alarm clock). I have found many previously coded alarm clocks/countdown timers but they dont do what i need. Then what do you need you might be asking yourself?! - I need a countdown timer with background in MySQL database(there will be multiple events in that database) and then checks which is the next one( Alarms will be in HH:MM format so they can be activated every day), after the check it displays a countdown(logical eh?) until that event - when it reaches that event it should redirect to some other site(which will return user to the same site after 15 min pause) and then All over again, check which is next, countdown , redirect , AGAIN
This website is designed not to be clicked or anything - it should work by itself.
02-29-2012, 01:05 PM
Ok, usually we are not a cheap coding service. You should ask specific questions about code (or code segments) that you have already implemented and that you're still having problems with.
I think there is another forum section on CF where you can find someone for hire.
02-29-2012, 01:43 PM
here is the example of how the program should work :
Lets say that we have it on some machine connected to a big screen.
On the screen there is a big clock . Underneeth is a cooldown. We start at 7 AM
02-29-2012, 03:22 PM
Ok, some hints
2. You'll need a server side script / program (like PHP) to access the MySQL database
3. You can send a request to this server side script and receive the results (output) of the script
4. You can use the normal browser URL bar to access the server side script, you can use HTML forms to call the script and you can use so-called AJAX techniques to access the script
6. This means: You can output the MySQL date/time as whatever you want ... maybe even as "17:59" in 24 hrs format ...
At this point I don't understand your specific requirements. Are you talking about several events that will lead to several parallel countdowns on the user's screen? Or is it just one event at a time (the next one) and as soon as this is finished, check the next event?
03-02-2012, 08:41 AM
Thank you - that explained allot, and that is just the kind of help i needed!
I get around php and MySQL so it wont be a problem collecting data from MySQL.
It is just one event at a time (the next one) and as soon as this is finished, check the next event.
This should be something like an info panel. I already made ticker box at the bottom ( that wasnt too complex - allot of pre-coded tickers on the web). but i wasn't able to find that cooldown that shows exact time from now to a variable.
03-02-2012, 09:49 AM
Counting down from now to a later time today will not be a problem. A pitfall will be if the destination time is less than the current time so the event will be tomorrow.
var dest = "07:59";
var hours = parseInt(dest.substring(0, 2), 10);
var mins = parseInt(dest.substring(3), 10);
var destDate = new Date();
var now = new Date();
if(now>destDate) destDate.setTime(destDate.getTime() + 24*60*60*1000); // add 1 day
var diff = destDate - now;
var hourstogo = Math.floor(diff/(60*60*1000));
diff = diff - hourstogo*60*60*1000;
var minstogo = Math.floor(diff/(60*1000));
alert(hourstogo + " hours, " + minstogo + " minutes to go");
03-07-2012, 02:47 PM
Thanks alot! that helped. I had to modify it a bit but it worked ( still didn't menage to pull seconds out of it but hey.. not a priority ) .
I have another problem now... i decided to put 2 tickers (scrolling texts in the file - found some scroling text js files and included them but when i try to make 2 scroling texts they dont show. When i try to display only one it shows... And i really dont have any idea what to do...
<DIV ID="TICKER1" STYLE="overflow:hidden; width:1500px">
<DIV ID="TICKER" STYLE="overflow:hidden; width:1500px">
<?php echo $nesto ?>
You have any clue whats wrong?