JSFiddle - React, Tailwind, and code Playground
HTML
<a onclick="displayPopup();" href="#">Click here for a popup - this will appear even if popups are blocked in browser settings.</a>
JavaScript
function displayPopup()
{
var w = 630, h = 440; // default sizes
if (window.screen) {
var percent=100;
w = window.screen.availWidth * percent / 100;
h = window.screen.availHeight * percent / 100;
}
window.open("http://www.google.com","","width="+w+",height="+h+",scrollbars=yes,menubar=yes,status=yes,resizable=yes,directories=false,location=false,left=0,top=0");
}
alert("Now a popup will try to appear and if your browser settings have popups blocked, it will not appear.");
displayPopup();