Results 1 to 9 of 9

Thread: disable Back Button

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2001
    Location
    india
    Posts
    109

    disable Back Button

    hey all
    I want to disable the back button of browser.

    Is it possible
    I respect love and lovers ,but it should be possesive .
    I love friendship and friends but it should be true.

  2. #2
    Matthew Gates
    Guest
    Try this:


    Code:
    'Submitted on: 7/27/2000 1:52:38 PM
    'By: Sebastien Levesque
    
    
    Private Sub WebBrowser1_CommandStateChange(ByVal Command As Long, ByVal Enable As Boolean)
        On Error Resume Next
    
    
        Select Case Command
            Case CSC_NAVIGATEFORWARD
    
    
            If Enable = True Then
                'Forward dispo
    
    
                ForwardEnable = True
                    RaiseEvent ForwardUpdate(True)
                Else
                    'Forward non dispo
    
    
                    ForwardEnable = False
                        RaiseEvent ForwardUpdate(False)
                    End If
                    'Pas de forward
                    Case CSC_NAVIGATEBACK
    
    
                    If Enable = True Then
                        BackEnable = True
                        RaiseEvent BackUpdate(True)
                        'Back dispo
                    Else
                        BackEnable = False
                        RaiseEvent BackUpdate(False)
                        'Back non dispo
                    End If
                End Select
            If Command = -1 Then Exit Sub
            'End If
        End Sub

  3. #3
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    My God.. can we put this into a FAQ or something?

    1) Sure you can do it.. I've no doubt the code Matthew posted will do the job.

    2) It won't stop your users from being able to go back.

    3) Your users will hate you for it.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    We'd just need people to volunteer to write the FAQ. Any takers?
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  5. #5
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    I was thinking about starting a FAQ for this forum and maybe the Javascript forum. But i probably won't be able to start for another week. (last week of school is really hectic)

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jan 2001
    Location
    india
    Posts
    109

    i need the same in javascript

    hey all i need the same code in javascript.
    I respect love and lovers ,but it should be possesive .
    I love friendship and friends but it should be true.

  7. #7
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Dude, your not getting it.. just because you can do something doesn't mean you should. I think the message here is "don't disable the back button".

    And like Sastraxi said, explain what your trying to accomplish so we can suggest alternatives.

    The reason we are discussing a FAQ is because we all get tired of people asking how to do this and spawning a long drawn out debate over why you shouldn't.

    Your users expect the back button to work. And it should.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  8. #8
    Junior Member
    Join Date
    Dec 2000
    Location
    London
    Posts
    25
    I agree that you should generally avoid disabling things like the back button but sometimes there are valid reasons for doing so. I can think of a few instances when building asp apps where it's been far better for me to control the navigation etc. If you do disable it for whatever reason, I would suggest you replace it with you're own navigation; otherwise you'll piss users off!

  9. #9
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    For almost every reason i can think of disabling it, i can think of a reason how to do it another way without diabling it. If you are worried about security, there are many other ways to do it w/ out disabling the back button!!

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

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