I need to allow a user to click a link in "page-1.htm" and open a popup window. Then, when the user browses to "page-2.htm" in the main browser window I need to be able to reference the popup window.
JavaScript in "page-1.htm"
var playerWin = window.open("player.htm", "playerWin", "width=300,height=130");
playerWin.play("song.mp3"); // play() is a function in player.htm
JavaScript in "page-2.htm"
playerWin.play("tune.mp3");
This code in page-2.htm generates an error "playerWin is not defined". That is understandable because no variable named playerWin has been defined on page-2.htm.
My question is: Am I able to reference the popup window from page-2.htm?