1

I want to open 2 website in a new tab not in new window, but when the code runs, it opens first link but not the second one. Here is my code

<body onclick="doOpen()">

<script type="text/javascript">
function doOpen()
{
    window.open("http://website1.com/",'_blank');
    window.open("http://website2.com/",'_blank');
}
</script>

I want to open both. Thanks in advance for your help !

2Dee
  • 8,609
  • 7
  • 42
  • 53
user2707013
  • 195
  • 1
  • 1
  • 5

1 Answers1

-5

you say

window.open("bhasoor bhasoor bhasoor");

and expect it to open in new tab???

not sure if it exists but you should try something like

**tab**.open("bhasoor bhasoor bhasoor");
  • "window." refers to the browser window, not a "window". And don't "think" what an answer is, know it. – Asons Feb 26 '14 at 09:31