online test

Posted on 2008-11-12
Last Modified: 2012-05-05
Hello Experts,

I have been working on a really small project in since a while now, due to the pressure at work I have made it live although I know its not working quite right.

Its like a doing a online test, user will have 45 mins to complete the test of 30 random questions out of total 50.

Most of the things are working OK i guess but the timer which i have done in javascript does not actually redirect to endtest.aspx page if the time is up .. and few more little things like this due to my poor web programming.

please can someone help me here?

many thanks for your time and help

Question by:learningnet
    LVL 3

    Expert Comment

    will help if you post your code where you are facing the problem with the timer. also mention how it presently behaves.

    Author Comment

    thanks for your comment
    at the moment its simply stopping at 00:00:01 and not redirecting to the endtest.aspx page

    please can you advise?


    <script type="text/javascript">
            var hiddenControl = '<%= txtClock.ClientID %>';
            var today;
            function StartTime()
                today.setSeconds(today.getSeconds() - 1)
                var h=today.getHours();
                var m=today.getMinutes();
                var s=today.getSeconds();
                // add a zero in front of numbers<10
                if ((h == "00") && (m == "00") && (s == "01"))            
                    window.location = "EndTest.aspx"
            function Init()
                document.getElementById(hiddenControl).value ='<%= SessionData.RemainingTime %>';
                time = document.getElementById("txtClock").value.split(":")
                today = new Date()
                today.setHours(time[0], time[1], time[2])
            function CheckTime(i)
                if (i<10)
                  i="0" + i;
                return i;

    Open in new window

    LVL 3

    Accepted Solution

    which version of IE are you using? can you try to test it in firefox? or else,
    try window.location.href ="EndTest.aspx", though it shouldnt make a difference.
    you can also give a try to window.navigate.
    tell me if it works.

    Author Comment

    ok will try, thanks for your response

    please can you have a look at this


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
    Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now