function loadPage(list) {
location.href=list.options[list.selectedIndex].value
}
I have a function, that loads from a list:
<form name="countrySelector" id="countrySelector">
<select name="file" size="1" onchange="loadPage(this.form.elements[0])" target="_blank" onmouseclick="this.focus()">
<option value="empty">Select</option>
<option value="http://www.facebook.com/">Argentina</option>
Is there a way to force this function to open the link in a new window?
Try it out on jsFiddle. Be warned that it might trigger the user’s popup blocker.