You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by João Vieira da Luz <Jo...@gmail.com> on 2004/09/11 15:31:35 UTC

Re: [OT] synchronous form submit in a popup so parent refreshes prope rly

You can remove reload and window.close from onclick and submit form...
onclick="document.forms[0].Dispatch.value='Save';document.forms[0].submit();"

The Action that receives this form could forward page with the removed
javascript

window.opener.location.reload(true);window.close();

In this way you guarantee that parent window is refresh only when
submit is processed.



On Fri, 10 Sep 2004 11:19:17 -0500, Barnett, Brian W.
<bb...@scholarinc.com> wrote:
> I have a popup with a save button that works like this:
> 
> onclick="document.forms[0].Dispatch.value='Save';document.forms[0].submit();
> window.opener.location.reload(true);window.close();"
> 
> The problem is that the parent window gets refreshed before the submit
> finishes what it needs to finish, i.e., write stuff to the db. I want the
> parent window to be refreshed after the submit has finished. What are some
> ways I can try to make sure the submit finishes before the parent window
> gets updated?
> 
> Thanks,
> 
> Brian Barnett
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org