CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Jul 2010
    Location
    Bangalore
    Posts
    5

    Back button is working after logout the application?

    I am developing one application using jsp and spring.In this application,After click the logout button,it is redirected to login page.Then If we click on backbutton(or backspace), it is going to previous page.How to avoid this?

  2. #2
    Join Date
    Sep 2012
    Posts
    1

    Re: Back button is working after logout the application?

    Hello Sri,

    If you wnt to stop the navigation from page 2 to page 1 ,then place the following piece of code in your page1.

    <SCRIPT type="text/javascript">
    window.history.forward();
    function noBack() { window.history.forward(); }
    </SCRIPT>
    </HEAD>
    <BODY onload="noBack();"
    onpageshow="if (event.persisted) noBack();" onunload="">



    It redirects your control to page 2 rather taking you to page1.

    Regards,
    Kartik.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured