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.
I have used following code to open a popup –
popup = window.open(location, "popup","menubar=1,resizable=1,scrollbars=1,width=650,height=450");
How can I do that?
You can use
openerto reference the parent window from your child window. Here’s an example from W3 Schools…… and here’s a working example from me:
Parent Window
Script
HTML
Child Window
Script
HTML