Modifying the Back Button Function

  • Thread starter Peter D. Dunlap
  • Start date
P

Peter D. Dunlap

Hello,

I realize that this may not be the best place to ask this question,
through the application is asp.net. I also realize that questions
about disabling the back button are generally met with derision, so
let me explain:

(1) The site is actually a web-based application, not a "web site" per
say, and is not accessable by the public. It is an application used
internally by the company I work for, though it accessed by employees
at remote locations,.

(2) The site/application is rather heavily frame based, and also makes
use of some session variables to control some its operation. Hitting
the back button throws the session information out of sync with the
loaded pages and causes havok. Hitting "back" on a context menu is
even worse, because then the frames themselves are out of sync with
each other.

What I would LIKE to have happen is:

(a) If the user hits the browser back button and the application is on
its home page, I'd like it to go ahead and back up to wherever the
user came in from.

(b) If the user hits the browser back button and the application is
NOT on its home page, I'd like it to go back to the home page (the
simplest way being to just reload the entire frameset). From there
the user could back out to wherever he/she came from.

(c) If the user hits the back function on a context menu it should
either do nothing, or behave as if the browser's back button was hit.

Presently I'm running the application in a popup window without a
toolbar, which solves the back button problem. However, it causes two
windows to be open, which I'd rather not have, and it doesn't solve
the context menu problem. I believe its possible to disable the
context menu (I've seen it done), but I want the print function to
still be available.

If possible I'd like the solution to work with both IE and Mozilla,
since we have employees that use both.

If anyone can help, I'd appreciate it.
 
C

Cowboy \(Gregory A. Beamer\)

Pop up is your best solution here, despite the two windows. Browsers run in
a bit of a sandbox when it comes to altering the code. As you want both IE
and Mozilla, a custom web client is out of the question, which would be
another option (using the IE OCX, or similar). I know that popups are a
pain, but I have used them in the past.

You might be able to solve the business problem in another way, but that
would cause you to rethink your code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top