I've used the following example from this post:
function whenClicked()
{
window.close();
opener.location.href = "http://www.somesite.com";
}
but amended to this:
function openLink()
{
window.close();
opener.location.href = this.href;
}
to open a link from a popup window. This works fine in IE, FF, Chrome & Opera but Safari doesn't want to play ball. Firstly, my popup window doesn't work, it opens in a new tab (but that's another issue) and when I click the link, the tab closes but the new link doesn't open.
Any ideas?
Edit:
Added an if statement to detect Safari and deal with it for now but a solution would be ace!
function openLink()
{
if (isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/)) {
opener.open(this.href);
}
else {
window.close();
opener.open(this.href);
}
}