View Full Version : How to disable popup blocker by using javascript

12-06-2006, 10:24 AM
Hello :) ,
i m using a mehtod window.open('test.html') in our code. but on my client side we have intalled pop-up blocker. so when i execute this code then the page will open but pop-up blocker close this new window. so plz help me and tell me how i can open this window by using javascipt code without uninstall pop-up blocker. I have already applied window.resizeTo() method instead of window.open, but then I need disable menubar, addressbar and toolbar. How can I disable these? plz help me it is very urgent......

12-06-2006, 05:59 PM
There is no way that I know of to disable pop-up blockers, only ways to work around them IF they will let you. Unless the pop-up blocker is really aggressive, this sort of thing works:

<a href="whatever.htm" onclick="window.open(this.href);return false;)">Link Text</a>

You can use a full window.open method with all of the specifications you desire. However, unless the user is clicking on this to apparently 'user select' it, most pop-up blockers will block it. Some really aggressive ones will block it anyway and some browsers, will do unexpected things like open tabs, open a full sized complete new window regardless of the specifications, or do nothing.

The best bet is to not use window.open for organizing or laying out your site and its contents. Reserve it for non-essential special effects.