0

I have this and i can't get it to work on Safari for OS X (Safari 8.0). It works on Firefox and Chrome but i simply cannot get it to work in Safari.

function myChangeHandler() 
{
window.open(this.options[this.selectedIndex].getAttribute('value'), '_blank');
this.form.submit();
}

What am i missing?

Thanks

Darkkz
  • 384
  • 4
  • 21

1 Answers1

0

I'm not sure what doesn't work since there is no specific problem that is posted but I'm guessing it's the window.open()?

I found this article

window.open(url, '_blank'); not working on iMac/Safari

it might be the one you were looking for.


From: Kelly J Andrews

The standard window.open() JavaScript method cannot be used to open a new tab and window from a global HTML file or an extension bar. Instead, the global file and extension bars have access to the SafariApplication, SafariBrowserWindow, and SafariBrowserTab classes, whose methods and properties allow you to work with windows and tabs.

It goes on to explain how you can use

var newTab = safari.self.browserWindow.openTab();
Community
  • 1
  • 1
Ashenvale
  • 111
  • 11