I want to make the visitor click anywhere on my page to open a pop-up window behind the main window that the visitor is on. So it will not see the window that was opened.
I'm using this function:
window.onload = function()
{
document.onclick = function( e )
{
window.open( 'http://www.google.com.br' );
}
}
The problem with this function is that it only opens a new tab.
I would like it to open like this function below:
function myFunction() {
window.open("http://google.com.br", "_blank", "toolbar=yes, scrollbars=yes, resizable=yes, top=1, left=1, width=1, height=1");
}
But with this function above it only opens if there is a button to click. I wanted it to open up when you click anywhere on the page. But behind the main window.