0

I have a webapp function in javascript that should open an external link in safari (iOS).

Using:

window.location.href = "http://stackoverflow.com";

The page is opening in the same window.

I'm trying window.open method but nothing happens.

I have tried this:

window.open(
  'https://support.wwf.org.uk/earth_hour/index.php?type=individual',
  '_blank' // <- This is what makes it open in a new window.
);

But it doesn't work. What am I doing wrong?

Nathaniel Ford
  • 20,545
  • 20
  • 91
  • 102
Daniel Campos
  • 971
  • 4
  • 11
  • 20
  • An alternative if you're specifically looking for an Angular solution: http://stackoverflow.com/questions/20099784/open-links-in-new-window-using-angularjs – user229044 Apr 10 '15 at 23:00
  • Often time the browser will prevent pop-ups, mobile safari is the worst offender of this. Check to make sure you do not have pop-up blocked and or it is not prompting you to allow/show the pop-up at runtime when you trigger this action – TheSharpieOne Apr 10 '15 at 23:55

0 Answers0