Results 1 to 4 of 4

Thread: How can you tell if a webbrowser if being redirected?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2002
    Posts
    628
    *bump*

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    May 2002
    Posts
    628
    *bump*

  3. #3
    Lively Member
    Join Date
    Nov 2001
    Location
    maryland (it sucks)
    Posts
    124
    Try this:

    VB Code:
    1. Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
    2.  
    3. If URL <> list1.list(x) then
    4.      Cancel = True
    5.  
    6.      'you could also add a page to go back to if a redirect is
    7.      ' happening
    8.      webbrowser1.navigate "url_here"
    9. End If
    10.  
    11. End Sub

  4. #4
    Lively Member
    Join Date
    Nov 2001
    Location
    maryland (it sucks)
    Posts
    124
    Also, you should make sure that the url's in the list box use the same format as the URL property does (http://www.site.com). If not, then you won't be able to make the comparison.

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