0

I have been researching intently and have been unable to find a solution to my problem. I have a 'home' page and you can select a button that generates a popup window called 'test'. Now if I close the popup window is I want it to instantly do something on my homepage, like write "Hello World". Is there a built in function that checks if the window is closed? I have come across many self made links with self made functions called window.close. Here is the code I have that generates the popup window. Any help would be much appreciated.

$var = "<a href='JavaScript:newPopup(\"http://www.yourfantasyfootballreality.com/register.html\");' class='two'>Register</a> | <a href='JavaScript:newPopup(\"http://www.yourfantasyfootballreality.com/signin.php\");' class='two'>Sign In</a>";
Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
John Doe
  • 1,950
  • 9
  • 32
  • 53

1 Answers1

1

I think you need window.onbeforeunload.

Also read this question.

Community
  • 1
  • 1
Marcel Korpel
  • 21,536
  • 6
  • 60
  • 80