JavaScript Trigger window.open When a User Clicks Anywhere on Page
Posted
by Joe Hammonds
on Stack Overflow
See other posts from Stack Overflow
or by Joe Hammonds
Published on 2010-05-01T23:56:31Z
Indexed on
2010/05/02
0:07 UTC
Read the original article
Hit count: 222
I have a problem that I have been trying to figure out and haven't been able to get past it because Chrome/FireFox/IE do not publicly publish their "rules" for pop up blocking when it comes to JavaScript, Flash, etc. I am trying to trigger a window.open() when a user clicks anywhere on page. I've tried this:
document.onclick = window.open("http://msn.com");
But all 3 browsers are blocking the popup, even though it is a user interaction.
© Stack Overflow or respective owner