javascript: window.open does not work?

advertisements

i am trying to implement this:

https://stackoverflow.com/a/30225669/533426

but, a simple open window does not work, see here:

http://codepen.io/anon/pen/LkLNaX

javascript:

 window.open('http://www.bippo.com', '_blank');
alert("wtf");

am i missing something?

this should work especially well on android and iphone phones.


Maybe you redefined the open function elsewhere or window.open() isn't called directly by a user action. Specially in mobile browsers, you can't call this function from a timer or any asynchronous task.