Results 1 to 2 of 2

Thread: Java Script to enable pop up blocker

  1. #1
    Join Date
    Jul 2014

    Java Script to enable pop up blocker

    need to open a new tab via window.open. But when i try the below script, if the chrome or firefox browser blocked the popups, its not opening. How to tackle this situation. i.e. how to enable popup using javascript.

    Here is my coding

    var windowName = 'userConsole';
    window.open('Redirect Url', windowName, 'width=1000, height=700, left=24, top=24
    ,scrollbars, resizable');

  2. #2
    Join Date
    Mar 2007
    I just tried this in an HTML page I use to mess around with code
    x=window.open("about:blank","The cost","left=20,top=20,width=400,height=300,toolbar=0,resizable=1");
    x.document.write("The cost is : ",cost);
    The browser it was tried in was Chrome.

    What you might want to try is to use a blank.html file on your server then set the new URL if you are navigating away from your domain.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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