With the following snippet of code:
<button onClick="location.href='http://google.com'" type="button">Click me</button>
The button simply uses the same tab to visit google.com.
The solution was to use:
<button onClick="window.open('http://google.com')">Open second window!</button>
Which now opens a new browser window once clicked.
comments powered by Disqus