online test

Hello Experts,

I have been working on a really small project in ASP.net 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

regards
kay
learningnetAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

snowalpsCommented:
will help if you post your code where you are facing the problem with the timer. also mention how it presently behaves.
0
learningnetAuthor Commented:
hello,
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?

thanks

<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
            m=CheckTime(m);
            s=CheckTime(s);
            if ((h == "00") && (m == "00") && (s == "01"))            
            {                
                window.location = "EndTest.aspx"
            }  
            document.getElementById(hiddenControl).value="0"+h+":"+m+":"+s;
            t=setTimeout('StartTime()',1000);
        }
        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])
            StartTime()
        }
 
        function CheckTime(i)
        {
            if (i<10)
              {
              i="0" + i;
              }
            return i;
        }
    </script>

Open in new window

0
snowalpsCommented:
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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
learningnetAuthor Commented:
ok will try, thanks for your response

please can you have a look at this

http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_23899456.html

thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.