Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: how to disable forward and backward buttons using js

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default how to disable forward and backward buttons using js

    how to disable forward and backward buttons of browser using js??


  2. #2
    Member DanBrown's Avatar
    Join Date
    Jan 2011
    Posts
    134
    My Mood
    Confused
    Thanks
    1
    Thanked 12 Times in 12 Posts

    Default Re: how to disable forward and backward buttons using js

    <head>
    <SCRIPT type="text/javascript">
    window.history.forward();
    function noBack() { window.history.forward(); }
    </SCRIPT>
    </head>
    <body onload="noBack();" onpageshow="if (event.persisted) noBack();" onunload="">
    Thanks and Regards
    Dan Brown

    Common Java Mistakes

  3. #3
    Junior Member
    Join Date
    Feb 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: how to disable forward and backward buttons using js

    Thanks for reply.

    Its working,but after logged in I enter into index page which contains frameset ans frames.each frameset are loading differently when i'm clicking back button.

    Please help me to solve issue

    Thanks in advance
    Raneesh

  4. #4
    Member DanBrown's Avatar
    Join Date
    Jan 2011
    Posts
    134
    My Mood
    Confused
    Thanks
    1
    Thanked 12 Times in 12 Posts

    Default Re: how to disable forward and backward buttons using js

    Click here

    Hope this will help you
    Thanks and Regards
    Dan Brown

    Common Java Mistakes

  5. The Following User Says Thank You to DanBrown For This Useful Post:

    Raneesh (February 3rd, 2011)

Similar Threads

  1. Forward to a link from Java
    By makdu in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: November 30th, 2010, 06:45 AM
  2. [SOLVED] Buttons not working..
    By khms in forum What's Wrong With My Code?
    Replies: 14
    Last Post: September 2nd, 2010, 06:01 PM
  3. JRadio buttons
    By chronoz13 in forum AWT / Java Swing
    Replies: 0
    Last Post: November 29th, 2009, 01:08 AM
  4. Need more buttons!
    By GotWankel? in forum AWT / Java Swing
    Replies: 0
    Last Post: October 5th, 2009, 01:08 AM
  5. Insert master or gloabal java script to disable globally onclick
    By karnesb in forum Java Theory & Questions
    Replies: 2
    Last Post: October 12th, 2008, 04:10 PM