yehuda Posted July 6, 2012 Share Posted July 6, 2012 how do you make an uncheatable online quiz using javscript?i've noticed on w3school quizes that the answers are easily accesed by viewing the source code.<br /><table><tr><td valign='top'><b> 3. </td><td valign='top'><b>Choose the correct HTML tag for the largest heading<b></td></tr></table><br /><table border='0'><tr><td valign='top'><input type='radio' name='quiz' id='2' value='2' /></td><td><label for='2'><heading></label></td></tr><tr><td valign='top'><input type='radio' name='quiz' id='3' value='3' /></td><td><label for='3'><h6></label></td></tr><tr><td valign='top'><input type='radio' name='quiz' id='1' value='1' /></td><td><label for='1'><h1></label></td></tr><tr><td valign='top'><input type='radio' name='quiz' id='4' value='4' /></td><td><label for='4'><head></label></td></tr></table>the correct answer is always id='1'i also happaned to have taken a real online exam a few weeks ago and i wonder if i could have cheated there too.thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted July 6, 2012 Share Posted July 6, 2012 If everything is purely Javascript then it's pretty difficult to make so that you can't cheat, because the code to check for the correct answer was sent to the browser. It would be better to submit each question and answer to PHP and have PHP check it and send the score back. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now