This is exactly the behavior you will get with my suggestion.  I'm using
<body onLoad="javascript:self.close()"> in the done.jsp page.  When the
action processes and there are no errors, it immediately forwards to
that page and the window closes.  From the users perspective, the
instant they hit submit the window closes, they can't tell at all it's
forwarding.  If there are errors, the window doesn't close and it goes
back to the original form.

-----Original Message-----
From: Geeta Ramani [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 22, 2004 12:05 PM
To: Struts Users Mailing List
Subject: RE: close the window if no errors

Hey I think I know what you are looking for. Correct me if I am wrong
but here's what i assume you are doing:

You have a "parent" window where somebody licks a link or something
which opens a "child" window and the user edits stuff in the child
window and then submits it. Off the form goes to an action, and if there
are no errors you want the child window to go away and the user to sit
looking at the "parent" window. Is this correct?

If so, you can do this.. but first tell me if I am way off-base or
something..

Geeta

> -----Original Message-----
> From: sudheshna aaa [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 22, 2004 12:06 PM
> To: [EMAIL PROTECTED]
> Subject: RE: close the window if no errors
> 
> 
> Team,
> 
> I think I need to have something like this psuedo code:
> 
>    <%
>    if(errors.isEmpty()){
>    %>
>    javascript:window.close();
>    <%
>    }
>    %>
> 
> Can anybody correct this code? I am getting errors not 
> defined. I want to 
> access ActionErrors> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to