I have a page that has an Add button. On clicking that, a child window opens. When the child window form is submitted by the user the (child)window should close and the parent form should be reloaded. (And this should not happen before the child form does its processing..or else the updates wont be seen:)

Brian Glodde


if( request.getMethod().equals( "POST" ) )
    <script language="javascript">
    setTimeout( "window.close();", 1250 );

That's how I would do it. Don't even write the javascript until the jsp has posted to itself.