Print Page | Close Window

How to disable refresh and go back

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=21287
Printed Date: 29 March 2026 at 5:00pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: How to disable refresh and go back
Posted By: hamsicik
Subject: How to disable refresh and go back
Date Posted: 13 September 2006 at 2:02pm
Mates,
 
I am studying on a web questionnaire and to prevent cheating, I need some knowledge. Is there any way to prevent visitors to go back (if any goes back he must run across a timed out page), and to prevent refreshing the page( if any refreshes he must be redirected to a error page or timed out page).
 
Thanks in advance



Replies:
Posted By: Freon22
Date Posted: 15 September 2006 at 2:22pm
I think you are going to need to use a client-side language like javascript.
 


Posted By: dpyers
Date Posted: 15 September 2006 at 4:26pm
You might want to look at something like QuizFaber - http://www.lucagalli.net/index.html - http://www.lucagalli.net/index.html

They have a fairly active support forrum, and I'm sure this problem's been addressed at some point.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: zMaestro
Date Posted: 29 September 2006 at 2:42am
use ajax....
you won't disable them, but will make refreshing doesn't get the desired action.


Posted By: hamsicik
Date Posted: 29 September 2006 at 3:24am

Dear zMaestro,

What is ajax and how to do?


Posted By: dpyers
Date Posted: 29 September 2006 at 9:28pm
http://en.wikipedia.org/wiki/Ajax_%28programming%29 - http://en.wikipedia.org/wiki/Ajax_(programming)

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: zaboss
Date Posted: 30 September 2006 at 6:50am
Why use something so unreliable and not doing with plain and simple ASP?
When you load the test page, just write into the database: username, time, testID. Then when loading the page, all you have to do is to check wether the user has done the test or not. If he took the test, you would write a message to him, "Sorry, you are only allowed to take the test once", if not, he will go on with the test. But you have to make sure that you write somewhere in the page to warn him not to refresh the page or use the back button.

Of course, you can just write a cookie, but if he would have them disabled...


-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web


Posted By: hamsicik
Date Posted: 05 October 2006 at 3:34am
Problem is not to compel people to take the test once only. The main problem is when a person gives a wrong answer at 6th question, he can't go back and correct the answer and go on 7th question. If he tries to go back  to question he must come across a timed out page. And he mustn't refresh on a page that contain a hard question to retrieve a simplier question.


Posted By: zaboss
Date Posted: 05 October 2006 at 6:47am
I don't get it. How many questions do you show on a page? Because if you show multiple questions, there is no way you could prevent him to change an option to a question in the page. Like any form, you can modify any of your choices untill you hit the submit button. After that, you can't modify it anyway. 

-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web


Posted By: Scotty32
Date Posted: 05 October 2006 at 9:21am
kind of like what somone else said, you could store the answers in a database, then when they go back and try to redo 6 it says "sorry you have already answered this" and show 7

or just show 7 but ignore 6 if it was already answered meaning they think they "hacked" it but didnt

you could use it for them to review their results at the end aswell


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net