In what circumstances do blockup blockers in browsers activate, and in what circumstances do they not?
Can you ever use an onclick event on a link to trigger a popup (other than target = _blank) or will that always trigger the blockers?
In what circumstances do blockup blockers in browsers activate, and in what circumstances do they not?
Can you ever use an onclick event on a link to trigger a popup (other than target = _blank) or will that always trigger the blockers?
Share Improve this question edited Feb 12, 2014 at 6:32 tshepang 12.5k25 gold badges98 silver badges139 bronze badges asked Aug 24, 2012 at 9:10 WillWill 4,7443 gold badges40 silver badges70 bronze badges2 Answers
Reset to default 4Most popup blockers are triggered when a popup is launched indirectly from a user action.
Some popup blockers are triggered when a user clicks, but most are not. Basically, if the popup is triggered within a click handler (or code that it calls), you are generally okay.
If possible, I would remend avoiding popups entirely. They tend to disrupt the user experience, with a few exceptions.
Here is a pretty detailed answer about pop-ups. Yes you can use an onclick event to trigger a popup and generally that's how ad panies make money -- they track your click to know you have seen the pop-up ad and count it so the people sending the pop-up to you get money.
Also here is a pretty detailed article on how pop-up blockers work.