www.webdeveloper.com
Results 1 to 2 of 2

Thread: Java Script to enable pop up blocker

  1. #1
    Join Date
    Jul 2014
    Posts
    1

    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
    Location
    localhost
    Posts
    2,348
    I just tried this in an HTML page I use to mess around with code
    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.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

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



Recent Articles