It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Can I submit multiple links at once??

Can I submit multiple links at once??

Postby hiyatran on Tue Jan 11, 2011 4:48 pm

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.
hiyatran
 
Posts: 18
Joined: Mon Jun 21, 2010 1:53 am

Re: Can I submit multiple links at once??

Postby hiyatran on Sat Jan 15, 2011 2:04 pm

I sort of got it working, here's the code:

Code: Select all
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]);
      [B]self.close();[/B]   
   }
}


but the function self.close() or window.close() does NOT work
any ideas???
thanks
hiyatran
 
Posts: 18
Joined: Mon Jun 21, 2010 1:53 am


Who is online

Users browsing this forum: No registered users and 6 guests