With some javascript, I open a popup without problems using:
function myPopup2(x){
if (x==1)
{
myWindow = window.open( "timer.html", "", "height = 150, width = 300" );
}else
{
myWindow.close();
}
}
Then I run some PHP script that updates the page reload.
When I then proceed to close the pop-up window, this is not so, because the page was reloaded and the variable myWindow disappeared. "myWindow" is an undefined JavaScript error.
Does anyone know how I can get around this?
source
share