Results 1 to 3 of 3

Thread: Back button of web browser

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    266
    Hi all,
    Some queries regarding the back button in the web browser.
    How does one disable only the back button of the web browser?
    Is it possible to add an input button on the HTMl page and make its functionality equivalent to the back button?
    Thanks in advance.

  2. #2
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    you can't disable the back button, but you can put
    a button that do the same that the back button.

    <input type="button" value="back" onClick="history.go(-1);">
    <input type="button" value="forward" onClick="history.go(1);">
    <input type="button" value="refresh" onClick="history.go(0);">

  3. #3
    Guest
    To do it in the WebBrowser Control:

    Code:
    'Author: Sebastien Levesque 
    'Origin: http://www.planet-source-code.com
    'Purpose: enable / disable back & forward in a webbrowser control
    'Version: VB5+ 
    
    
    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

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