|
From: Spammay Blockay on 3 Feb 2005 20:37 Hi all... I'm writing a Struts application, and one window pops up another, non-modal, window. What I want to do is, when the user presses a button on the child window, I want the parent window to be the target of the server response. And I also want the child window to close. These windows are not frames, but fully-fledged browser windows. Is there a relatively easy way to do this, does anyone know? - Tim --
From: Dietmar Meier on 4 Feb 2005 07:47
Spammay Blockay wrote: > What I want to do is, when the user presses a button on the child > window, I want the parent window to be the target of the server > response. If that "button" is a link, use <a href="..." onclick="if (opener && !opener.closed) { opener.location=this.href; return false }" >...</a> If that "button" is a submit control, use <form ... onsubmit="if (opener && !opener.closed) { var s = "w" + new Date().getTime(); opener.name = s; this.target = s; }" > > And I also want the child window to close. Try to add "window.setTimeout('close()',100);" before the "return false" above or after the "this.target = s;" above. ciao, dhgm |