DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   How to disable Back button of IE when executing welcome.aspx page? (http://www.daniweb.com/forums/thread35732.html)

cumadhu Nov 22nd, 2005 12:45 am
How to disable Back button of IE when executing welcome.aspx page?
 
Hi All,
I need to disable Back button of IE when an welcome.aspx page load into the browser.
I dont want the user to click back button after logging in.

Is there any code to disable the back button of IE?

Please send your suggestions.


Thanks and with regards,
Madhusudhan.H.K.

campkev Nov 23rd, 2005 11:51 am
Re: How to disable Back button of IE when executing welcome.aspx page?
 
short answer is No. There is no direct way to disable the back button so that it is greyed-out and user cannot click on it. However, there are some tricks using javascript which might be able to give you the results you need,although they won't be as pretty. One I am currently working on involves using javascripts window.history function with a session variable and automatically logging off and redirecting to login page if user hits the back button. You can also do something as simple as:
<script language="JavaScript">
<!--
  javascript:window.history.forward(1);
//-->
</script>

Put that script at the top of every page. If user hits back button it will send them forward again.

cumadhu Nov 24th, 2005 12:58 am
Re: How to disable Back button of IE when executing welcome.aspx page?
 
Quote:

Originally Posted by campkev
short answer is No. There is no direct way to disable the back button so that it is greyed-out and user cannot click on it. However, there are some tricks using javascript which might be able to give you the results you need,although they won't be as pretty. One I am currently working on involves using javascripts window.history function with a session variable and automatically logging off and redirecting to login page if user hits the back button. You can also do something as simple as:
<script language="JavaScript">
<!--
  javascript:window.history.forward(1);
//-->
</script>

Put that script at the top of every page. If user hits back button it will send them forward again.



Yes ! Its working.
Thanks a lot,
Madhusudhan

sunilfromindia Aug 1st, 2006 11:09 am
Re: How to disable Back button of IE when executing welcome.aspx page?
 
[quote=cumadhu]Hi All,
I need to disable Back button of IE when an welcome.aspx page load into the browser.
I dont want the user to click back button after logging in.

Is there any code to disable the back button of IE?


where should I place the java script

sunilfromindia Aug 1st, 2006 11:10 am
Re: How to disable Back button of IE when executing welcome.aspx page?
 
Hi where should I place javascript

campkev Aug 1st, 2006 2:02 pm
Re: How to disable Back button of IE when executing welcome.aspx page?
 
just like it says, at the top of every page

tgreer Aug 1st, 2006 3:16 pm
Re: How to disable Back button of IE when executing welcome.aspx page?
 
There is no way to disable the back button reliably. Every method, short of writing your own browser, can be easily disabled. This question has been asked millions of times, for years and years. The "back" button is integral to how browsers work, and is firmly a part of the user interface and the collective "user expectation". Trying to fight it is usually a sign of poor understanding of the web, a flawed application model , and/or bad design!

Users will press the "back" button. They will be irritated if it doesn't work. They will often simply close the browser completely if your application doesn't behave as they expect.

prst123 Dec 29th, 2006 3:26 am
Re: How to disable Back button of IE when executing welcome.aspx page?
 
you cant disable only the back button
but u can sure hide the status bar (which includes several other buttons like refresh, forward etc )

nikkiH Dec 29th, 2006 10:26 am
Re: How to disable Back button of IE when executing welcome.aspx page?
 
Which can be gotten back again with one click.

Make a decent application instead; save yourself work and your users hassle.

rbeasley Sep 9th, 2007 11:40 pm
Re: How to disable Back button of IE when executing welcome.aspx page?
 
Quote:

Originally Posted by tgreer (Post 239308)
There is no way to disable the back button reliably. Every method, short of writing your own browser, can be easily disabled. This question has been asked millions of times, for years and years. The "back" button is integral to how browsers work, and is firmly a part of the user interface and the collective "user expectation". Trying to fight it is usually a sign of poor understanding of the web, a flawed application model , and/or bad design!

Users will press the "back" button. They will be irritated if it doesn't work. They will often simply close the browser completely if your application doesn't behave as they expect.

*****

I am sometimes amazed at the arrogance of some software developers who think that, of the 6+ billion people on the earth, no one could possible have a need to disable the back button. We just are stupid and don't understand the problem. Well, he's wrong. Hint: Just help people with their questions and don't be a smart @.


All times are GMT -4. The time now is 2:27 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC