Results 1 to 2 of 2

Thread: How to disable popup blocker by using javascript

  1. #1
    Join Date
    Dec 2006
    Location
    Calcutta, India
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to disable popup blocker by using javascript

    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......

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    HTML Code:
    <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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •