469,307 Members | 2,482 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

Modifying the Back Button Function

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.

Nov 17 '05 #1
1 4010
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.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge

************************************************** **************************
****
Think Outside the Box!
************************************************** **************************
****
"Peter D. Dunlap" <pd*****@insight.rr.com> wrote in message
news:4a********************************@4ax.com...
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.

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Ralph Freshour | last post: by
25 posts views Thread by KK | last post: by
4 posts views Thread by VA | last post: by
2 posts views Thread by chuck | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.