Javascript: How to retrieve a value from a popup after a click event is fired
<p>I have a page where clicking on a link will open a popup window. The popup window will contain some value. Now when user clicks on a div tag, I want to copy the text of that div into a text box of the main window. </p>

<p>I have used following code to open a popup - </p>

<pre><code>popup = window.open(location, "popup","menubar=1,resizable=1,scrollbars=1,width=650,height=450");
</code></pre>

<p>How can I do that?</p>
