views:

31

answers:

1

i am developing a online test website using PHP. i have set time limit for the test and i have used javascript to run the timer. what i want to do is to submit the form with answers when the time runs out. please help me to do it.

+2  A: 

Here you go:

var oneMinute = 60 * 1000,

submitTest = function () {
    document.getElementById("testForm").submit();
};

setTimeout(submitTest, oneMinute);
Magnar
@Magnar: thanks but not working for me.. is there any other way?
brainless
That's the way you do it. What about it is not working?
Magnar