I would like to open multiple tab in the main browser: Here is my code:
function openSM()
{
window.open(\"http://www.google.com\",\"_blank\")
Unfortunately, you have no control over this so you will not be able to force a new tab to open programmatically. It's the browser that controls that feature, which can generally be configured by users.
It could only be forced if you have control over the client's browser configuration and/or can install extensions in the client's browser (often the case in intranets)
I had done similar work, but didn't get success using simple javascript on page. So I create an extension and then the same code worked, you need a little modification in that:
var urls = ["http://www.google.com", "http://www.yahoo.com", "http://www.bing.com"];
var interval = setInterval(function() {
var url = urls.pop();
if(!!url) {
window.open(url);
}
else {
clearInterval(interval);
}
}, 100);
Hope this work for you too.