View Single Post
  #1 (permalink)  
Old 04-21-2005, 08:37 PM
ovi
Guest
 
Posts: n/a
Exclamation Open different URL from 1 button

One day searching trough the internet for some information, I have found that is possible to open more URL from 1 button. this can be done using the following code:

Code:
<html>
<head>
   <title></title>
</head>
<script language="javascript">
function whackOpen(){
 var url    =  new Array(3);
 url[0]   = 'http://www.site1.com'
 url[1]   = 'http://www.site2.com'
 url[2]   = 'http://www.site3.com'
 
 for (var i = 0; i < url.length; i++){
    window.open(url[i],"","");
 }
 alert("I am so sorry for creaming your bandwidth")
}
</script>
<body>
<input type="button" onclick="whackOpen()" value="Open windows" />
</body>
</html>
Reply With Quote