Results 1 to 2 of 2

Thread: countdown timer

  1. #1
    Join Date
    Jun 2012

    countdown timer

    hai, I want to create a timer for online test page which gets the time duration for countdown from database and dosenot reset on page refresh.
    i have a timer which gets time from database but it resets on page refresh.
    i am using php mysql.
    i am a newbee so pls help me.
    thanks in advance.

  2. #2
    Join Date
    Oct 2010
    Versailles, France
    It easy to get a date with javascript from PHP like this

    	// Convert the timeLimit (coming from data base) to UTC 
    <script type="text/javascript">
    	// Define a javascript interger*1000 for seconds=>milliseconds 
    	var timeLimit=parseInt("<?php echo $timeLimit ?>");
    	var dateLimit=new Date(timeLimit*1000);
    	//... Display a countDown with this date 
    With the Bionoid countDown this can give something like this

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center