In my main page named 'main.html', I have a link that opens a popup or focuses on an existing popup using the following code snippet:
var test; if (test == null || test.closed) test = window.open('test.html','test','width=800,height=600,location=0'); else test.focus();
Everything works fine, except for one issue: If a user opens the main page multiple times in their browser, clicks the link in one instance of the main page and then clicks the link in another instance, it reloads the popup because it does not recognize that the popup is already open.
Is there a way for me to share the handle of the popup among all the instances of the main page so that they can use the same popup?
Thank you for your guidance.