• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

popup submission should trigger .do, close popup, reload originating page

This is the same as my question http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21403235.html, except I don't think I stated  it clearly enough.

I think this is a much better formulation of my question:

I have a A.jsp that gets displayed when one goes to http://localhost/A.do?order=11
This A.jsp contains a link to a popup B.jsp.  The form in B.jsp is then submitted to B.do which saves the data entered in that form to the DB.  That part is working.

What I need to happen is that when that form in B.jsp popup is submitted, the system should not only 1) go to the action  B.do, but also 2) close the  B.jsp popup and reload the page that triggered that, i.e. A.jsp(which means reloading the http://localhost/A.do?order=11 url)

How do I  do that?  Please specify the solution as clearly as possible.

Thank you  so much!
0
aturetsky
Asked:
aturetsky
  • 2
1 Solution
 
bloodredsunCommented:
Please see original post for solution...
0
 
aturetskyAuthor Commented:
brs, I posted a question  to your proposed solution in the original post.
Thanks again,
Alex
0
 
aturetskyAuthor Commented:
Here's the solution:

The target page of B.do will have the javascript which will first
reload A.do and close the window.

B.do should forward to this page once it inserts the data in the DB.

Example closeWindow.jsp
CODE

<%@ page contentType="text/html;charset=windows-1252"%>
<html>
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
   <title>Close Window</title>
 </head>
 <body>
  <script language="javascript"><!--
     opener.location.href = opener.location.href;
     window.close();
  //-->
  </script>
 </body>
</html>
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now