473,326 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 4245
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ralph Freshour | last post by:
Is it possible to inhibit the browser Back/Fwd buttons via PHP? Thanks...
11
by: Jason Heyes | last post by:
Look at my code: void modify_element(BigType &x) { /* not shown */ } BigType modify_element_copy(BigType x) { modify_element(x);
25
by: KK | last post by:
Hi, I am using history.go(-1) for implementing the back button functionality. Its working fine but with this exception. 1. The page which is having back button has some hyperlinks on it. ...
4
by: VA | last post by:
I am using a JS library of functions that I include in my web page using the usual <script type="text/javascript" src=...> method Is there a way to automatically call one of my own functions...
9
by: Stefan Mueller | last post by:
I'd like to set a variable called 'FocusIsOn' if a button got the focus. Because my button is dynamically created I do it like xelement = document.createElement("input") xelement.type = "button"...
8
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and...
2
by: chuck | last post by:
Hi, I am modifying some code from here http://www.quirksmode.org/dom/domform.html I have a div 'readroot' that I clone. I change the change the id and name of the childnodes of 'readroot' to...
11
by: GaryB | last post by:
Hi Guys, I've been battling with this one for hours - I hope that you can help me! My code modifies the <aon a page, from a standard document link into a link with a tailored onclick event. ...
4
by: Sean | last post by:
I have a situation whereby I need to modify the text string appearing on an ASP button with some text derived from a Javascript function. But I am unsure of the correct syntax to do so. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.