First of all, I would advise you to refrain from using popup windows, because they annoyed to many people, mostly due to Web ads, so many will use browser plug-ins to block them. I don't mean "modal popup" here, I mean window created with JavaScript
window.open
:
http://www.w3schools.com/jsref/met_win_open.asp[
^].
Now, if you still want to do that, note that this call returns a reference to the newly created window. Through this reference, you can access anything in its content through the DOM:
http://www.w3schools.com/jsref/obj_window.asp[
^].
First of all, pay attention for the
document
property:
http://www.w3schools.com/jsref/dom_obj_document.asp[
^],
http://www.w3schools.com/jsref/dom_obj_document.asp[
^].
From this point, you can see that you can use that window's document in the same way as you use the current document (the one accessed from the JavaScript on the current page).
—SA