To send the child window forward...
child.location.href='another.jsp';
What do you mean by the other part? Do you want to close any already open windows whose locations are another.jsp?
If you want to close the child window, what you have is right:
child.close();
Going out on a limb here. On the assumption that Java Server Pages are like ASPs, that is abc.jsp is a program that builds an HTML page with a <SCRIPT> in it.
The document in the child window can have a script that references the parent window and closes it with
window.opener.close();
If the document in the child window is built by another.jsp then it can close the parent window. The child window has a property, opener, which is the parent window. So you don't have to pass this information, the browser already has it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.