hussainian Posted September 7, 2010 Share Posted September 7, 2010 Hi!I'm developing an application in JSP. In one JSP, I do window.opn() and store its reference. Then i navigate to other pages. Doing so, i lose my reference to window.open() child. Is there any way the reference may be available throughout the application?One solution to this problem is that let i opened a window like window.open('','winName');Now if on any other jsp, I'll do the same thing again with the same name, a new window will be opened if previously opened window was closed. On the other hand, if the previously opened window is still open, i'll get the reference to that. Here the second case is ok, in which reference is obtained. But the first case, the opening of window in case the previous one was closed is unwanted, hence making this approach unwanted.Is there any better solution?Thanks.AsadUllah. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 7, 2010 Share Posted September 7, 2010 You can try to open it with an empty URL and if the URL of the window is empty then close it again, i.e. leave it open if it was already open, or else close it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.