I'm using this code here:
<input type="button" value="Latest Results" onClick="self.location='http://URL.COM/SEARCH STRING'+document.getElementById('code').value +'EXTRA BIT OF SEARCH URL'">
Which I'm using with an input box (sometime several input boxes) to take an input and quickly add it to a URL to search an internal system. It works great for what we need, but I'm trying to get it to open in a new window rather than the current one.
I've tried adding target="_blank" to the end and changing onClick="self.location= to window.open but no luck.
<input type="button" value="Latest Results" onClick="window.open('http://URL.COM/SEARCH STRING'+document.getElementById('code').value +'EXTRA BIT OF SEARCH URL', '_blank')">window.openas its second parameter has default_blank:P