When I click on Google chart and try to open a new window the pop-ups are blocked [closed]

3

When the user clicks on the google-chart I call this event:

google.visualization.events.addListener(chart, 'select', function(e){
                            self.selectHandler(chart, data);
                        });

And then I try to open a new window with the function window.open :

// open entity page
var newTab = window.open(url, '_blank');
if (newTab) {
    newTab.focus();
} else {
    alert('Please allow popups for this website');
}

But the pop-ups on the page are blocked preventing the window from opening.

How can I prevent pop-ups from blocking? Thanks

    
asked by Laiacy 20.02.2017 в 16:09
source

0 answers