In a Quiz script made in PHP, I am trying to use Javascript to disable possibility for user to switch to another window.
Means, if the Quiz window went blur, if user switched to another window, using taskbar, or using Start menu, or using Alt-Tab, the Quiz window has to either:
– back to top immidiately (not a good solution);
– close itself immidiately (and write the username into the log with description and timestamp, user would not be able to login next 24 hrs);
– ask user if he/she wants to close the window, because he does the step toward switching to another window – he tries to cheat.
Anybody saw tutorial, manual, step by step Javascript guide how to do this?
I already have few solutions, but this seems to be big problem to solve. I tried to find tutorial for this on Internet, but – only few pages have similar, but not the same topic.