Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6173521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:35:29+00:00 2026-05-23T23:35:29+00:00

I am working on online examination. In which the examination duration will fetch by

  • 0

I am working on online examination. In which the examination duration will fetch by mysql(in minutes). I want to show the countdown time on the top of the page.

currently I am using

http://javascript.internet.com/time-date/countdown-timer.html

but the main problem is .. when every time a new question display ..the page get refresh and ..timer reset again from start.

Please help me where is the main problem?

or any other example if you want to suggest?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:35:29+00:00Added an answer on May 23, 2026 at 11:35 pm

    Before running the test you need to calculate exact test end time on the server side and save it into session:

    <?php
    if (empty($_SESSION['test_will_end_by'])) {
        $_SESSION['test_will_end_by'] = time() + $test_duration_in_seconds;
    }
    ?>
    

    Then, if you provide it to your client-side script from HTML:

    Time left:
    <span class="timer" data-end="<?php 
        echo date(DateTime::RFC1123, $_SESSION['test_will_end_by']); 
    ?>"></span>
    

    Add this code into your jQuery DOM-ready handler to start all timers on a page:

    $('.timer').each(function() {
        var target = new Date($(this).data('end')), update, $this = $(this);
        (update = function () {
            var now = new Date();
            $this.text((new Date(target - now)).toUTCString().split(' ')[4]);
            if (Math.floor((target - now)/1000) == 0) return; // timer stops
            setTimeout(update, 1000);
        })();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an online FPS written in C# which will use P2P
I am working in an application which is a online examination application. Now at
I am working on a online shopping website, it will have product images also.
i am working on a online file management project.In which we are storing references
I'm working on online video conferencing project in C# and .Net4.0. I want a
We are working on an online mobile video app. The videos we want to
I'm working on an online food delivery site using ASP.NET/C#, I have a page
I am working on a project Online examination just to gain knowledge . There
I'm working on a project on Online Examination. In this when the question paper
I was working with a online game website. There are some event which call

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.