How can I disable the Back button in a browser


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: How can I disable the Back button in a browser

Hybrid View

  1. #1
    guptash Guest

    How can I disable the Back button in a browser


    Hi,
    Is there a way to disable the "BACK" button of a browser?
    Problem: I have an order entry page, once it has been filled and the next
    page is displayed I don't want the user to go back to the order entry page.
    Is there any way to avoid this?

    Thanks.

  2. #2
    Kris Eiben Guest

    Re: How can I disable the Back button in a browser

    You'd have to disable the back button, backspace key, alt-left arrow, and
    history. And the user could always turn off Javascript to get around any
    solution you've found. You're better off finding another way around the
    problem. Maybe set a flag (in a cookie or something) when the order is
    filled, then check for that flag on the order entry page and don't show the
    "submit" button if it's there.

    guptash wrote in message <39f60841$1@news.devx.com>...
    >
    >Hi,
    >Is there a way to disable the "BACK" button of a browser?
    >Problem: I have an order entry page, once it has been filled and the next
    >page is displayed I don't want the user to go back to the order entry page.
    >Is there any way to avoid this?
    >
    >Thanks.




  3. #3
    Join Date
    Jun 2008
    Posts
    2
    To disable back button use
    window.history.forward(1);

  4. #4
    Glenn Guest

    Re: How can I disable the Back button in a browser


    Kris basically told you what I'm going to say. In simple terms, put some
    code in for your window_onload event to check if a form field's value is
    blank. If it isn't, the user has hit the back button, so you should clear
    your fields.

    "guptash" <shubharavikiran@hotmail.com> wrote:
    >
    >Hi,
    >Is there a way to disable the "BACK" button of a browser?
    >Problem: I have an order entry page, once it has been filled and the next
    >page is displayed I don't want the user to go back to the order entry page.
    >Is there any way to avoid this?
    >
    >Thanks.



  5. #5
    Critter Guest

    Re: How can I disable the Back button in a browser


    On your first page you can put

    history.forward() so when a person goes from this page to the next their
    history will be of that page. Therefor no back button.......try it.

    Critter


    "guptash" <shubharavikiran@hotmail.com> wrote:
    >
    >Hi,
    >Is there a way to disable the "BACK" button of a browser?
    >Problem: I have an order entry page, once it has been filled and the next
    >page is displayed I don't want the user to go back to the order entry page.
    >Is there any way to avoid this?
    >
    >Thanks.



  6. #6
    Betty Buhr Guest

    Re: How can I disable the Back button in a browser

    I keep track of the idiots that disable the back button so that I
    never get stuck in their worthless site a second time.

    HTH

    On 11 Dec 2000 07:32:10 -0800, "Critter" <critter@dashsystems.com>
    wrote:

    >
    >On your first page you can put
    >
    >history.forward() so when a person goes from this page to the next their
    >history will be of that page. Therefor no back button.......try it.
    >
    >Critter
    >
    >
    >"guptash" <shubharavikiran@hotmail.com> wrote:
    >>
    >>Hi,
    >>Is there a way to disable the "BACK" button of a browser?
    >>Problem: I have an order entry page, once it has been filled and the next
    >>page is displayed I don't want the user to go back to the order entry page.
    >>Is there any way to avoid this?
    >>
    >>Thanks.



  7. #7
    Join Date
    Jun 2008
    Posts
    2
    How can I disable the Back button in a browser View for the second time.
    Means for the first time the back button should be in normal state and for the second time. its should be disable.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center