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

Posted on 2005-04-28
Last Modified: 2008-02-26
This is the same as my question, 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/
This A.jsp contains a link to a popup B.jsp.  The form in B.jsp is then submitted to 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, 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/ url)

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

Thank you  so much!
Question by:aturetsky
    LVL 29

    Accepted Solution

    Please see original post for solution...
    LVL 1

    Author Comment

    brs, I posted a question  to your proposed solution in the original post.
    Thanks again,
    LVL 1

    Author Comment

    Here's the solution:

    The target page of will have the javascript which will first
    reload and close the window. should forward to this page once it inserts the data in the DB.

    Example closeWindow.jsp

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now