-2

I 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');
Bharadwaj
  • 2,535
  • 1
  • 22
  • 35
  • 5
    Browser users expect their popup blocker to block popups. Find another way that doesn't require popups. – Robert Harvey Jul 03 '14 at 05:39
  • Try using `window.showmodaldialog` – Bharadwaj Jul 03 '14 at 05:43
  • Have you seen this post. Maybe its what you are looking for! http://stackoverflow.com/questions/9514698/bypass-popup-blocker-on-window-open-when-jquery-event-preventdefault-is-set – John Jul 03 '14 at 05:54
  • From your other questions, it seems you do not really have a clue about what you are doing. Learn the basics first, and read the FAQ on how to ask good questions. – Sebastian Mach Aug 06 '14 at 14:48

1 Answers1

0

Your cannot enable popups using Javascript. In modern browser new windows will be opend only in response to user interactions ( click, doubleclick etc.)

Vlas Bashynskyi
  • 1,886
  • 2
  • 16
  • 25