473,883 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to disable the back button in browser?

37 New Member
I accept any other solution for this:
I have five pages for registrering users. But I don't want users to be able to go back using browser back button. For example: Fill Page1 and go to Page2 then Page3. If user clicks back button I want to redirect him to Page1.
Aug 21 '07
15 15026
5 New Member
P.S. history.forward () method never has any parameter ;=)
Jul 18 '08 #11
366 Contributor
Hello Kbobce

i have tried by placing the script(what you have posted) in Head part of my web page ,but still it doesn't works any more to do after placing the script
Jul 21 '08 #12
5 New Member
Sorry I don't know why there's a space that came inside the script.
One should read :
window.onpagesh ow=function(evt ){if(evt.persis ted)noBack()}
Hoping this'll appear OK.
Jul 22 '08 #13
5 New Member
Again ! Let's try to write it in another way :
<script type="text/javascript">
function noBack(){
window.history. forward()
window.onload= noBack;
window.onpagesh ow=
if (evt.persisted) noBack()
window.onunload =
Jul 22 '08 #14
5 New Member
It's OK now.
No space inside "noBack"
Jul 22 '08 #15
366 Contributor
K thank you i will try with this one
Jul 22 '08 #16

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

Similar topics

by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" http://www.tonymarston.co.uk/php-mysql/backbuttonblues.html -- Tony Marston http://www.tonymarston.net
by: Dmitri Shvetsov | last post by:
Hi All, Is it possible to disable the backspace button in browser? I wrote a login page, then after login I can allow the user to work in the session. I don't want to allow the user to return back using browser features. If he needs to return back he could press a designed button. Using the standard Backspace button can destroy the usual flow of the program and database filling, even cause some problems on the login page if the user...
by: sonu | last post by:
I want to disable the browser referesh and back button. is there any way in .net for above. Regards Amit
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
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.
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.
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!
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
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
by: sethia4u | last post by:
Dear Programmers, when I click on logout button I redirect my page to login page again, session variables to null, but when I click on back button previous page is appeared. so plz tell me how I make disable the back button of browser.....
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,...
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,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.