Hi, I want to disable the Window.Open in Java on my webbrowser. However this is harder than it seems because I also want to get the URL which the script is attempting to open so if we had
Window.Open('http://www.google.com') then
The webbrowser would produce a dialog saying The current website wants to open a popup to
http://www.google.com.
Here is my code so far:
CODE
Private Sub me_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Me.NewWindow
If pops <= 3 Then
pops = pops + 1
Dim a As Windows.Forms.DialogResult = MessageBox.Show(Me.Url.Host & "wants to open a popup window.", "Confirm", MessageBoxButtons.YesNo)
If a = Windows.Forms.DialogResult.Yes Then
Form1.mknewtab()
Else
MsgBox("Popup Blocked")
End If
e.Cancel = True
MsgBox(e.ToString)
End If
End Sub
MkNewTab just makes a new tab, but I do not know how to get the url which the webpage wants to open.