I’ve been battling with this for a while now.
Could really use some help here.
I’m designing a quiz program, which is set on a timer.
Once the user clicks “Start Quiz”, he is re-directed to a new page, where the quiz begins.
He is presented with one question at a time. (10 seconds allocated to each question)
There are sooooooo many ways one could cheat, which is why I decided to implement the following “barriers” :
(a) a Javascript function which disables the “[B]Back[B]Back
(b) a Javascript function which disables “[B]Copy/Paste”
(c) a Javascript function which disables [B]“Right-Click
All these 3 functions seem to work. But, there are two issues which I am still unable to resolve
(a) trying to open the quiz-page in a NEW window, where “[B]toolbar
Here is the script I used, but it works only ONCE. Meaning, it disables the toolbar for only the next page (onClick). How can I do this for ALL subsequent pages, after the first one ??
[CODE]<script type=”text/javascript”>
function myPopup() {
window.open(“/Quiz/question_1.php”, “status = 1, height = 900, width = 900, resizable =
0, toolbar=no”)
}
</script>[/CODE]
(b) i know it is impossible to disable the [B]“Refresh”-button (F5)
From what I was able to get from Google, there is a Javascript function to disable the “F5” button, but it only works with Internet Explorer. It does not work with other browsers.
The best solution would probably be : somehow, assign each question a session “ID”; when the user tries to refresh the same page, he gets an error, because that “ID” has already been “initiated” (not sure if this makes sense”)