Print Page | Close Window

Stop the ability to Refresh the page

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=5175
Printed Date: 30 March 2026 at 7:46pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Stop the ability to Refresh the page
Posted By: silvaduro
Subject: Stop the ability to Refresh the page
Date Posted: 21 August 2003 at 3:36am

Hey,

In an ASP page I want to be able to stop the ability to refresh, i.e. either bring up a dialog or just not do anything when F5, the Refresh Button and Ctrl+R are pressed. Can anyone help me?

~silva




Replies:
Posted By: MorningZ
Date Posted: 21 August 2003 at 8:41am
its not possible

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: 3BEPb
Date Posted: 21 August 2003 at 9:49am
Silvaduro, there are some ways how to trick your lame users, however any more or less designated user will get anything he need (client side, I mean :)), including reload.


Posted By: zMaestro
Date Posted: 21 August 2003 at 3:46pm

Isn't there a way even through JavaScript?

I think something passed through me that assigns another job for the F5 key other than refresh!!! but Im not sure



Posted By: pmormr
Date Posted: 21 August 2003 at 6:03pm
your talking about Internet Explorer assigned keys. The F5 key is assigned refresh by windows. I would put my money on MorningZ's answer. Besides, why would you ever want to disable refresh.

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: dpyers
Date Posted: 21 August 2003 at 10:03pm
Anything you're likely to do to prevent a refresh will be like disabling right click - very annoying to your users and easily beaten.

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

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


Posted By: MorningZ
Date Posted: 21 August 2003 at 10:44pm
and you are NOT going to stop the "refresh" button on the top of an IE (or netscape or opera) window..... there is no script to take over someone's browser functionality

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: zMaestro
Date Posted: 22 August 2003 at 1:57am

a copy can be disabled even when clicking Edit | Copy, it appears a disabled item.

a Select of Text can also be disabled.

 

Stopping Refresh function is useful for example to prevent a form from being submitted twice.

 

there are scripts that can for example when pressing Control+H takes you to the Home Page, and so on.. that's what I meant by assigning a certain function to a certain Key.

Control+C can be disabled by a JavaScript Code.

 

I didn't say F5 can be disabled, I am just thinking in a load voice.



Posted By: MorningZ
Date Posted: 22 August 2003 at 6:02am

as said....

regardless if you could or couldn't intercept F5 (that is possible), you are not going to be able to stop the "refresh" button on the browser bar itself



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: pmormr
Date Posted: 22 August 2003 at 8:20am
if you don't want to submit a form twice then redirect away from the processing page as soon as it's processed.

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: b_bonnett
Date Posted: 22 August 2003 at 5:38pm

Or you could do what Bruce has done with these forums - use Javascript to disable the submit button once the form has been submitted:

document.FormName.SubmitButton.disabled=true;

Blair



-------------
Webmaster, http://www.planegallery.net/ - The Plane Gallery
Greetings From Christchurch


Posted By: zMaestro
Date Posted: 23 August 2003 at 12:58am
Originally posted by b_bonnett b_bonnett wrote:

use Javascript to disable the submit button once the form has been submitted

Disabling Submitting twice is a different case...
 
Consider you already submitted a form, that for example add records to a database, and when the process is completed you refreshed!!!
 
the form will be submitted again and will duplicate the entry in the database....
 
 


Posted By: zMaestro
Date Posted: 23 August 2003 at 1:03am

Originally posted by pmormr pmormr wrote:

if you don't want to submit a form twice then redirect away from the processing page as soon as it's processed.

a good idea to consider

but also sometimes it takes a long time to a form to be submitted (Server time) as for example sending mail to a mailing list or so on, so the user may think that the page needs to be refreshed, and so Refresh before the page being redirected...

 

in all ways... we were thinking on how to stop page refreshing... either we will find a use for it or not ... but as you all aggreed... "It is a weak case"... I surrender ...

 




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