Pregunta

I've been using an adapted version of this code:

HTML Input Buttom

I've adapted it to have one button to search multiple sites..

<script>
function multiSearch(){
window.open (SEARCH URL A);
window.open (SEARCH URL B);
window.open (SEARCH URL B);
</script>

<input type="button"  value="Latest Results" onClick="multiSearch;">

Which works fine but in Chrome only first Search window opens as a new tab, the other two open as pop ups. Is there anyway to get them all to open as tabs?

¿Fue útil?

Solución

window.open(url, '_blank') sometimes opens in a new tab, but usually in a new window depending on how it is used. You cannot control it directly using Javascript unfortunately.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top