Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: Disabling the Back Button.


Message #1 by "Swapnil Potdar (CTS)" <PSwapnil@P...> on Fri, 7 Jul 2000 10:55:08 +0530
Sorry sent this message out before my second reply, but it never seemed to 
get to the list, so I'm reposting it now.

>How can I  programmatically disable the BACK Button in an Internet
>Explorer Browser ?

This question comes up time and time again. First of all it is INCREDIBLY 
user unfriendly to do this and against the spirit of the Web. When you're
browsing sites using a search engine and you go to a site and it doesn't
have what you want, you want to go back to where you are. If you are
forcibly detained on a site it really is incredibly irritating. You can 
make sure that when someone goes to a site or page that a new window is 
created and the back button is automatically disabled by default.

Using just HTML it isn't possible to do this, but given that in the latest
browsers, the whole browser is exposed as part of the object model, I'd
imagine that using client-side script, it would be possible to disable the
button (although this wouldn't disable the list of backtrack messages on 
the down arrow next to the back button).

If you do have genuine need to stop users going back to where they were 
before, then much better to build in solid validation and verification 
routines to stop them entering their details twice into a database say. 
Even on the banking sites I've come across enabling transactions of money 
from one account to another, the back button is left operational. Obviously 
it would be possible to go back and repeat the operation over and over 
again, but you have to rely on the good sense of the user not to do this. 
If you'd let us know why you need to perform this task and we might be able 
to suggest alternative and more user friendly ways of achieving your ends.

Cheers,
Chris


  Return to Index