Results 1 to 4 of 4

Thread: block modal popup

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    193

    block modal popup

    I am using Microsoft Web Browser control to make use of NewWindow2 and NewWindow3 to block popup. I also make use of popuptest.com to test popups if they will appear. However, one type of popup which is modeless window does persist to appear with the code I have below. I needed to block all types of popups specially those that will make new tab and or new window.


    Code:
    Imports AxSHDocVw
    
    Public Class Form1
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
            axwb.Navigate("www.popuptest.com")
            axwb.Silent = True
            AddHandler axwb.NewWindow2, AddressOf axwb_NewWindow2
            AddHandler axwb.NewWindow3, AddressOf axwb_NewWindow3
        End Sub
    
        Private Sub axwb_NewWindow2(sender As Object, e As DWebBrowserEvents2_NewWindow2Event) Handles axwb.NewWindow2
            e.cancel = True
            axwb.Navigate(axwb.StatusText)
        End Sub
    
        Private Sub axwb_NewWindow3(sender As Object, e As DWebBrowserEvents2_NewWindow3Event) Handles axwb.NewWindow3
            e.cancel = True
            axwb.Navigate(axwb.StatusText)
        End Sub
    End Class

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    193

    Re: block modal popup

    up on this

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,989

    Re: block modal popup

    Well, you're just in an arms race. As soon as there were popup blockers, there were people trying to find ways around the popup blockers. You may not want popups, but you can be pretty darn sure that there are people out there who don't want you to be able to block them. So, for every popup that evades whatever block you are attempting, you'll have to study the HTML and see how the popup works, and what it is doing to avoid your blocking. As it stands, you haven't said anything about what you are doing to block the popups that you currently are blocking, so nobody is likely to be able to suggest anything about how to evade your block, let alone how some other popup IS evading your block. I would think that there would always be popups that you can't block, because it is entirely possible for a page to bring up a popup that isn't really a popup , but a graphical manipulation of the current page. So, you're going to have to explore what the evasive popup is, and how it works.
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    193

    Re: block modal popup

    Shaggy, what you said is true. but for testing purposes, i am trying to block a new window popup to appear like on the example MODELESS WINDOW of www.popuptest.com, all else example where blocked and some popups where just inside the browser. So I am after blocking new window popup.

    Moreover, I dont have enough knowledge other than the basics on exploring or seeing how the popup works and what html code to check.

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