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?