Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27514

link in webbrowser when clicked no response

$
0
0
hi
I'm new here.

i got problem with webbrowser.

I tried another website, it works OK, i think the problem is due to the link is in
<script type='text/javascript'>
(function(jQuery) {
{"url":"9/4/4/9/9449543/2334523.jpg","width":"333","height":"226","link":"http://www.xxxxx.com/"},
})(window._W && _W.jQuery)
</script>


so what to do?

thanks guns


i opened a website, whose links all forced to open in a new window or tab, with my webbrowser, but when i click the links, nothing happens.

so i have to right click and choose "open link" or "open link in a new window". so the IE will start with the link.

i don't know why.

and also i want to open the click with my default browser CHROME, but i only got a new start of CHROME without the link.
here is the code for default browser instead of IE
Code:

    Private Sub WebBrowser1_NewWindow(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
                e.Cancel = True
              Dim senderb As WebBrowser = CType(sender, WebBrowser)
              Dim url As String = senderb.StatusText
              openURL(url)
      End Sub

    Private Sub openURL(ByVal url As String)
        Try
            Dim key As RegistryKey = Registry.ClassesRoot.OpenSubKey("http\shell\open\command\")
 
            Dim s As String = key.GetValue("").ToString()

            Dim reg As New Regex("""([^""]+)""")
            Dim matchs As MatchCollection = reg.Matches(s)

            Dim filename As String = ""
            If matchs.Count > 0 Then
                filename = matchs(0).Groups(1).Value
 
                System.Diagnostics.Process.Start(filename, url)
            Else
     
                System.Diagnostics.Process.Start(url)
            End If
        Catch
            MessageBox.Show("failed")
        End Try
    End Sub


Viewing all articles
Browse latest Browse all 27514

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>