Assuming you are submitting a form saving changes, set  window opener (parent is
not valid name in your case) as a  target for the form action property. After
submitting of the form close popup window explicitly.

//This is a fragment of your  popup window source
<script language="javascript">
function saveChanges(form)
{
//Put your form validation here if you need some

  form.target = window.opener;
  form.submit();
  window.close();
}
</script>

<body>
  <form name="myForm" method ="post" action="myServletUrl">
     - - - -
  <input type="button" value="Save Changes" onClick="saveChanges(thisform)">
  </form>
</body>

Hope it helps
~boris



Louis wrote:

> Hi,
>     I got a problem, hope someone can help me.
>
>     For example, I have a page contain a lists of username & email address.
> When user click the username, it will popup
> a window allow user to change the email address.  If the user save what he
> changed, the page will invoke the servlet and
> do processing and return the result to the jsp page (result show in parent
> window).  My problem is how to refresh the parent window and close the popup
> window after the servlet process?
>     I know this can be done, coz I saw JRun JMC using this design, but I
> don't know how to do it.  Please give me some suggestion.
>
> Thanks in advance
>
> Louis
>
> p/s: IS THERE ANYONE TRY TO FIXING THE JSP-MAILING LIST BUGS?
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to