| Author |
Struts action triggered by onUnload event
|
Joe Urbanek
Greenhorn
Joined: Jan 31, 2005
Posts: 15
|
|
I have an action class that triggers a pop up window displaying the results of the action. What I want to happen is when a user clicks a cancel button in the popup window I want the pop up window to transfer the control to the parent window and then trigger an action class that refreshes the parent window before the pop up closes, then I want the pop up window to close. Any assistance is appreciated. [ January 31, 2005: Message edited by: Joe Urbanek ]
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
Joe, I'm moving this thread over to our HTML and JavaScript forum since your problem is not specific to Struts (the solution is the same, regardless of whether the target is a Struts action, a JSP, or a regular Servlet). Please continue the discussion over there. Thanks.
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
you can do <body onunload="window.opener.reload()"> Eric
|
 |
Joe Urbanek
Greenhorn
Joined: Jan 31, 2005
Posts: 15
|
|
|
.reload() does not seem to work with Firewox, it must be MicroSoft specific code.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
I perfer to use window.location.href=window.location.href Eric
|
 |
 |
|
|
subject: Struts action triggered by onUnload event
|
|
|