How to close a pop up window using the anchor's OnClick in javascript?
<p>I have a php page that opens a pop window. it contains the search results. each result is inside the anchor tags. </p>

<p>I can open a new tab containing the information in the parent window, but somehow the <code>OnClick</code> function does not work. what i want to do is when the user select a link, will open a new tab then the pop up window automatically close. I dont know why the <code>OnClick</code> event is not doing what I want. </p>

<pre><code>&lt;?php
&lt;a href='edit.php?id=$id' target='_blank' onClick='self.close();'&gt;Listq&lt;/a&gt;
?&gt;
</code></pre>

<p>the code above works but it closes the pop up before opening the <strong>new tab</strong>. please help. thanks. </p>
