Guest lenix Posted February 6, 2013 Share Posted February 6, 2013 Hi phpfreaks. . how to auto submit(calculated already) exam result on the database after the countdown timer reaches to zero.. ->I know phpfreaks can help me. Big thanks in advance. 143 all!!! Link to comment https://forums.phpfreaks.com/topic/274089-auto-submission-of-exam-result-when-time-is-over/ Share on other sites More sharing options...
requinix Posted February 6, 2013 Share Posted February 6, 2013 You can submit the form in Javascript by calling the .submit() method on it. Link to comment https://forums.phpfreaks.com/topic/274089-auto-submission-of-exam-result-when-time-is-over/#findComment-1410398 Share on other sites More sharing options...
Guest lenix Posted February 6, 2013 Share Posted February 6, 2013 Thank you so much for a that great idea guru requinix. Link to comment https://forums.phpfreaks.com/topic/274089-auto-submission-of-exam-result-when-time-is-over/#findComment-1410399 Share on other sites More sharing options...
Guest lenix Posted February 22, 2013 Share Posted February 22, 2013 I'm stuck guru requinix. . pls help me. I don't know how to use .submit() method.(as Im new to Javascript) . What I did is just loading the query(for inserting to DataBase). ex: process_exam.php automatically when time is Over using document.location='process_exam.php'; . When the page loaded it is only showing empty page and nothing happens. Instead of diplaying "YOU HAVE FINISHED THE EXAM" then the data have been save already to the database Link to comment https://forums.phpfreaks.com/topic/274089-auto-submission-of-exam-result-when-time-is-over/#findComment-1414087 Share on other sites More sharing options...
kicken Posted February 22, 2013 Share Posted February 22, 2013 First, make sure your form has an ID on it. <form id="yourform"> Then you just get a reference to that form using getElementById() and call it's .submit() method. document.getElementById('yourform').submit(); Just changing the location (document.location='blah';[/) like you did does not submit any of the form details, so your processing script would not have an of the data it needs to do it's job. Link to comment https://forums.phpfreaks.com/topic/274089-auto-submission-of-exam-result-when-time-is-over/#findComment-1414097 Share on other sites More sharing options...
Guest lenix Posted February 28, 2013 Share Posted February 28, 2013 Thanks a lot guru kicken. . My problem was solved.. Link to comment https://forums.phpfreaks.com/topic/274089-auto-submission-of-exam-result-when-time-is-over/#findComment-1415603 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.