473,624 Members | 2,510 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To disable BACK BUTTON?

1 New Member
disable back button..... page should no do postback...
i used history.go, history.back, session.abandon ...and many more...but still previous page shows.... help me to expire the previous page.......
Feb 9 '08 #1
3 2870
acoder
16,027 Recognized Expert Moderator MVP
This has been asked a number of times. See, for example, this and this.
Feb 9 '08 #2
sravan2000
1 New Member
this is the code to disable back button
just try this

<script language="javas cript">
javascript:wind ow.history.forw ard(1);
</script>
Feb 29 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
<script language="javas cript">
javascript:wind ow.history.forw ard(1);
</script>
There are a number of problems with this.

Firstly, language is deprecated - use type="text/javascript" instead.

Secondly, there's no need for the javascript: protocol here.

Thirdly, and most importantly, there's no reliable way to disable the back button. One way is to use location.replac e, but it can't be 100% reliable. If this is needed for a web application, just warn the user instead.
Feb 29 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2757
by: Rob Smeets | last post by:
Hi I was wondering, is it possible to disable the back button in internet explorer. Our Website is hosting a Siebel website, and the problem is that Siebel has problems with the use of the back button in internet explorer. I can't make a customized internet explorer because the site must be accesible anywere. So i need to do it from the server side... Any Ideas?? Thanks in Advance,
6
3152
by: nntp | last post by:
I have a set of links which I want search engines to crawl them, but I want to disable them from my visitors, so I will ask the link owners to pay me to let me enable them. <a disabled href="#">bahbahbah</a> Does not work, as it is still clickable. It only changes the color to grey.
2
13260
by: techfuzz | last post by:
I scoured this group and others looking for the best way to disable a button after the first click to prevent multiple submissions, but never did find anything that worked like they said it would. I went ahead and wrote my own bit of code so I'm sharing it here for everyone. Even though it doesn't really disable the button by greying it out, it prevents the multiple submissions which it what I was attempting to prevent all along. ...
14
7177
by: Sinity | last post by:
Anyone knows the method/codes to disable the clicked button after first click by using .aspx-- to prevent people to click many time when waiting for the server response. I tried to do this by adding a java script for the button. But, useless.. Please help! Thank you
6
2795
by: Raghu Raman | last post by:
Hi, we are doing an in house project in c#.net(asp.net).We wanted to close our application when ever the user presses the SIGNOUT button. Even though we programtically disconnects them from the database,when we press the Internet explorers Back button ,all the browsed pages are displayed with the data**. 1.could you pls tell me how to disable the back-button of IE
3
2597
by: Paul | last post by:
Hi, just wondering if there is a way to disable the back button of the browser as I have a logoff page and would like to not allow the back operation? Guessing there may be a way to do it through java script. -- Paul G Software engineer.
1
6006
by: Terry Olsen | last post by:
Is there any way to disable the client browser "Back" and "Forward" buttons while on my site? Or how would I go about knowing that a page hit is caused by a back/forward navigation? I have discovered that my web app is definately NOT Back/Forward safe. It's really messing with my SQL data bigtime. Thanks.
16
3423
by: Barry Gilmore | last post by:
Is there a way to disable a button after it is clicked? I am trying to avoid having someone click on it twice while they wait for it to process. Thank you!
9
3989
by: Joe Delphi | last post by:
Hi, When users log out of my web application, I want to disable the back button so that they cannot "back into" the application after they have logged out. Can someone tell me the best way to do this? JD
6
29612
by: sspost | last post by:
how can i disable the back button for a browser? I have been reading a lot of forums but cant find any answer to it...other than opening up the page, in which i want to disable the browser in a new window(which i dont want to do) Is their a way to do it? using javascript or something? I have tried using the following but non of them actually disable the back button: window.history.forward(1); -- does not disable the back button
0
8231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8168
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8614
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8330
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6107
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1474
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.