javascript to launch only ONE window for a Java applet with a given URL
- by Jonathan Dugan
I need a javascript solution to launch only one window, with a Java Applet in it, for a given URL. I found a solution posted here on Stack Overflow -
here: http://stackoverflow.com/questions/528671/javascript-window-open-only-if-the-window-does-not-already-exist
But it doesn't seem to work .. I get
Error: launchApplication.winrefs is undefined
Line: 29
I can't seem to post the code in this little box and make it look right below,
so the code (my working code, plus the solution from above)
is here: http://pastie.org/833879
Where is the error?
As I understand it, the hash or array or whatever I use to store the called references to the windows opened this way will be lost if the calling window is closed.
Is there a way to make this work even if the calling window is closed and reopened? To basically ask the browser: "Do you have a window open with the following URL?" and if so, "What is the reference to that window?" (so I can raise it).