Can I submit multiple links at once?

Is it possible to submit multiple links all at the same time using Javascript? I check all over the web and can’t find any examples anywhere.

I would like to click on a button and submit to google, yahoo, msn, etc all at the same time. Like someone physically click on http://google.com, http://yahoo.com, http://msn.com, so on.

Yes its possible, try something like this

var openURL = ['google.com','yahoo.com','msn.com'];

for(var i in openURL){
    if (openURL[i].substr(0,4) != 'http'){
        openURL[i] = 'http://'+openURL[i];
    }
    
    window.open(openURL[i]);
}

It worked, thank you
here’s the code:

function addtext() {
var openURL = new Array(“google.com”,“yahoo.com”,“msn.com”);
for(var i=0;i<=openURL.length;i++){
if (openURL[i].substr(0,4) != ‘http’){
openURL[i] = ‘http://’+openURL[i];
}
window.open(openURL[i]);
self.close();
}
}

After I open the window, I would like to close it but self.close() or window.close() function does not work

any ideas on how to close the window it opens??
tks

You would need something like this

var openURL = ['google.com','yahoo.com','msn.com'];
 
for(var i in openURL){
    if (openURL[i].substr(0,4) != 'http'){
        openURL[i] = 'http://'+openURL[i];
    }
   
    var window[i] = window.open(openURL[i]);
    window[i].close();
}