title: Open multiple child windows with one click
body: <p><br>
  I'm trying to open multiple child windows when a single button is clicked. For instance, I have a block labelled "1" and when it is clicked, a corresponding child window with a shockwave flash video plays. However, I want the videos from block 2 and 9 to play as well, as they are next to block 1. Or, if I clicked on 12, the windows for 4, 11, 13, and 20 would appear too, since they surround 12.</p>
  
  <p>Here's the website I'm working with, to give you a better idea.</p>
  
  <p><a href="http://alexalmaguer.site90.com/" rel="nofollow">http://alexalmaguer.site90.com/</a></p>
  
  <p>This is the code I'm using to get the child window to appear for one video.</p>
  
  <pre><code>&lt;a href="1.html," target="ItsAGoodDay" onClick="wopen('1.html', 'ItsAGoodDay', 400, 300); return false;"&gt;1&lt;/a&gt;
  </code></pre>
  
  <p>1.html just has an object tag with the .swf in it, and a bit of styling to keep the .swf in the middle of the window.</p>
  
  <p>I'm also using a premade script I found on this website to center the child window in the middle of the screen when it opens. I think this might need to be changed as well.</p>
  
  <pre><code>&lt;!--
  function wopen(url, name, w, h)
  {
  
    w += 32;
    h += 96;
    wleft = (screen.width - w) / 2;
    wtop = (screen.height - h) / 2;
  
    if (wleft &lt; 0) {
      w = screen.width;
      wleft = 0;
    }
    if (wtop &lt; 0) {
      h = screen.height;
      wtop = 0;
    }
    var win = window.open(url,
      name,
      'width=' + w + ', height=' + h + ', ' +
      'left=' + wleft + ', top=' + wtop + ', ' +
      'location=no, menubar=no, ' +
      'status=no, toolbar=no, scrollbars=no, resizable=no');
  
    win.resizeTo(w, h);
  
    win.moveTo(wleft, wtop);
    win.focus();
  }
  </code></pre>
  
  <p><strong>EDIT</strong>: Due to limited space, I'm thinking I might just make the windows to the left and right of the selected block open, and not the ones on top and bottom.</p>