Click here to Skip to main content
15,911,030 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Is there any java script code that will open a popup window even when popup blocker is enabled or google toolbar popup blogger is enabled.

I have seen the same effet when we open any banking site, it open a popup window even when my popup blocker is enabled.

I will be very thankful to you.
Posted
Updated 21-May-11 2:49am
v3

You need to understand how popup blockers work and which types of popup they block.
From MSDN,
The Pop-up Blocker blocks script-initiated pop-up windows that are created by the following methods, without the user clicking a link.
The Pop-up Blocker does not block pop-up windows that open as a direct result of a user action. A user-initiated action includes clicking a page element or tabbing to a link and then pressing ENTER.

So if a popup is created by some user action, browsers won't block it under default settings. So use this technique.

BTW, read this MSDN link for better understanding of the concept - About the Pop-up Blocker[^]

Hope this helps! :thumbsup:
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 22-May-11 0:29am    
This is good, my 5, but I think I have a better idea :-)
Please see my answer.
--SA
Why not view source on the banking site to see how they do it ? Are you sure you've not enabled them to do it, in your browser settings ?
 
Share this answer
 
Just a note: imagine the feeling of the user who set up the anti-popup plug-in and still see popup in that banking site, and later in your site. One of the reasons I use the services of my bank is that they never allow such dirty tricks in their site. Seriously. Don't do it! Not using popup is quite feasible an much better.

—SA
 
Share this answer
 
Comments
Ankur\m/ 23-May-11 0:17am    
Browsers allow only user initiated popup in default setting. And that's for a reason. There are few situations where it may be necessary. The MSDN link I gave in my answer discusses this very well. Please read it.
Sergey Alexandrovich Kryukov 23-May-11 18:37pm    
Yes, this is a good document; I already voted.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900