Thank you Geeta and Nathan!
From: "Geeta Ramani" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Subject: RE: close the window if no errors Date: Thu, 22 Apr 2004 12:56:48 -0400
Sudheshna:
I think you may be misstating the problem whne you say "exzamine the errors object in the child window" and thereby tying yourself in knots. :) Because really the "examination" is happening in the action. This may be why you have not seen what Nathan has been trying to suggest. Anyway, here's what you can do (and pretty much Nathan's solution too):
Submit in child window -> go to action -> process.
If errors dont exist, then forward to "child" window using a forward called "done" in your struts-config.xml mapping: "done" will map to "child.jsp?done=true". (Note that you already have coded child.jsp, so you dont need another jsp at all!) So anyway, when this case happens, the user will be directed to child.jsp with the additional request param "done". In your child.jsp add this kind of code:
<%if(request.parameter("done"!= null)) { %> <body onLoad="self.close()"> <%} else {%> <body> <%}%>
So when child.jsp?done=true is done rendering on the screen, it will immedaitely close, so the user will be left loking at the parent window.
Hth, Geeta
> -----Original Message----- > From: sudheshna aaa [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 22, 2004 12:33 PM > To: [EMAIL PROTECTED] > Subject: RE: close the window if no errors > > > Geeta, > > Exactly this is what i am looking for. I need to examine the > errors object > on the child window and if it is empty, I need to close this > child window. > > Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Get rid of annoying pop-up ads with the new MSN Toolbar – FREE! http://toolbar.msn.com/go/onm00200414ave/direct/01/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]