Using JavaScript to launch window behind browser for users agreeing to survey
<p>I am asking a small percentage of users on a site if they would take a short survey.  If they click 'yes' I would like to close the little pop-up window i have open that is asking them, and launch a new window in the background that comes to the forefront once they leave my domain - or close their browser.</p>

<p>Right now I am using a form:</p>

<pre><code> &lt;form&gt;
        &lt;input type="button" value="Yes" name="Yes" onclick="javascript:openSurvey();"&gt;
        &lt;input type="button" value="No Thanks" name="No" onclick="javascript:closeSurvey();"&gt;
&lt;/form&gt;
</code></pre>

<p>I'm having trouble with this though. I think I can launch the new window OK, but I can't figure out how to close the other window and put the new window in the background.  Any tips?</p>
