title: Open new window in form submission
body: <p>I have a table of data in rows with a check box per row, done by passing in '#tableselect' for the #type using the FAPI. I would like to take the user selected options, send them to the $_GET url of an external site, and show that external site in a new window (the external site draws a graph using my data) using javascript. In my form submission function, I have:</p>
  
  <pre><code>drupal_add_js('$(document).ready(function() {window.open(\'' . $url . '\')});', 'inline');
  </code></pre>
  
  <p>I can see that Drupal adds this line on the page when I click the submit button, but no new window is opened when I step over the line in Firebug. What am I doing wrong?</p>