Controlling The Back and Forward Buttons on a brow

Results 1 to 4 of 4

Thread: Controlling The Back and Forward Buttons on a brow

  1. #1
    Vipul Desai Guest

    Default Controlling The Back and Forward Buttons on a brow

    I have an application, and I was wondering if anyone knew how to disable a browser&#039s Back and Forward buttons. I do not want to set up Session Variables that Serve as Flags because it could be a possible source for errors. <BR><BR>Thanks, <BR><BR>Vipul

  2. #2
    Join Date
    Dec 1969
    Posts
    463

    Default RE: Controlling The Back and Forward Buttons on a

    You can always just open the new page in a new window which will in essence disable the back button, but I feel using flags and controlling your variables and users actions is still the way to go. Any advanced ASP app uses certain flags to control what is presented to the client.

  3. #3
    Randy Guest

    Default RE: Controlling The Back and Forward Buttons on a

    I know of no way to disable back/forward buttons with client script.<BR>What about making a cookie that stores a value equal to the name of the current page the user can access. Add javascript to every link that sets the cookie with the name of the link. Make every page check the cookie and if it isn&#039t the right name do a javascript window.location.back. <BR>Just a thought.

  4. #4
    Join Date
    Dec 1969
    Posts
    760

    Default Controlling Back and Forward with javascript

    Using document.location.replace(url) allows you to go to annother page without adding a history entry.<BR>I use this often for language change situations.<BR>The user clicks a link to changelanguage.asp which sets <BR>Session("Language") = "newlanguage" and returns a document that <BR>uses document.location.replace(document.location) to force-reload all the frames from the server. <BR>There are many way to accomplish the language switch but this way if the user clicks "back" afer changing languages, they go where they think they should.<BR><BR>My last asp app had to(in the contract) allow "back" and "forward" to behave exactly as dummies would expect at all times and without causing errors.<BR><BR>If you have pages that perform critical data actions (reloading would be bad)you should redirect to a confimation page.<BR><BR><BR><BR>-A<BR><BR>If it isn&#039t total control, it isn&#039t control


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •