struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From not <eink...@milinovsky.at>
Subject Re: [OT] Re: Struts1 - how to reload parent window from popup
Date Mon, 08 Sep 2008 11:59:55 GMT



newton.dave wrote:
> 
> --- Martin Gainty <mgainty@hotmail.com> wrote:
>> use javascript
>> javascript:history.back();
> 
> I don't believe that would submit the form in the parent window, and I
> don't
> think the window that popped up would have a history anyway, no?
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

With window.opener you ge ta handle to the parent-window. To submit / reload
the form in the parent and close the child do something like this:

var parentWindow = window.opener;
parentWindow.document.forms[0].action=url; /* Whatever the action will be or
leave it as it is */
parentWindow.document.forms[0].submit();
parentWindow.focus();
window.close();	

-- 
View this message in context: http://www.nabble.com/Struts1---how-to-reload-parent-window-from-popup-tp15917342p19370582.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message