title: onsubmit of form, warn user and open in popup window?
body: <p>I have a form that when submitted I want the resulting window to be in a popup but before that I need a warning. If I do the following:</p>
  
  <pre><code>target="DoSubmit" onsubmit=" DoSubmit = window.open('about:blank','DoSubmit','width=500,height=350'); return confirm('Our Twitter account is set to private. If you click OK this will log a call with the Helpdesk and then take you to a page where you can request to follow us. Once we have approved the request you will be able to see our Tweets.');"
  </code></pre>
  
  <p>this will open the pop-up then show a warning putting the pop-up behind the window and carrying out the result of the form before the user has pressed OK or cancel. If I switch them around and put the warning before the popup, it just opens in a new tab rather than a popup with a fixed size. Can you help with this? The full form code is as follows:</p>
  
  <pre><code>&lt;form name="TwitterSubscribe" id="TwitterSubscribe" action="./logconfirm_Twitter.php" method="post" target="DoSubmit" onsubmit=" DoSubmit = window.open('about:blank','DoSubmit','width=500,height=350'); return confirm('Our Twitter account is set to private. If you click OK this will log a call with the Helpdesk and then take you to a page where you can request to follow us. Once we have approved the request you will be able to see our Tweets.');"&gt;
            &lt;input type="image" src="./images/twitter.png" onmouseover="this.src='./images/twitterHover.png';" onmouseout="this.src='./images/twitter.png';" /&gt;
            &lt;/form&gt;
  </code></pre>