How to disable browser's popup blockers using javascript/jquery?

4.2k views Asked by At

I want to block the browser's default popup blockers using javascript or jquery. I've found a few solutions, but they don't work for Chrome/Opera. It oly works for Mozilla Firefox. I'm using this jQuery solution right now:

    // Attach click event to the link
    $('#popup_openbox_blocked').click(function() {
            // window.open() works here because it is initiated by an user's click action
            // We prefer window.open() to the anchor's href action because we want to save the return reference from window.open
            var new_window = window.open("http://google.ro", "", "");
            popup.close(); // Close the custom alert. Won't work unless you have popup() defined
            return false;
    });

    var newWin = window.open();
    newWin.location = "http://google.ro";

How can I deactivate the browser's popup blocker for Chrome and Opera using jquery/javascript?

0

There are 0 answers