Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts action triggered by onUnload event

 
Joe Urbanek
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can do

<body onunload="window.opener.reload()">

Eric
 
Joe Urbanek
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.reload() does not seem to work with Firewox, it must be MicroSoft specific code.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I perfer to use

window.location.href=window.location.href

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic