hi ya,
        in the validation try this...
        if ( validation_function() != true )
        {
                document.formname.target = "self";
        }
        else
        {
                document.formname.target = "_blank";
        }

        setting the target to self will to the redirect to the same
window.....

regards
guru

-----Original Message-----
From: Martinez, Beatriz [mailto:[EMAIL PROTECTED]]
Sent: 13 December 2001 16:05
To: [EMAIL PROTECTED]
Subject: open a new window browser depending on servlet response


Hi everybody,

I have a JSP with a form, when this form is submitted some validations are
done.
I want that when the validations are OK, a new browser window would be
opened.
BUT if there is some error the error message must be shown in the first JSP
and NOT open a new window.

I'm trying to do this with a TARGET="_blank" at the FORM tag, but the
redirection from the servlet is
always shown in the new window.

Is there any way to avoid opening the new window and make the redirection of
the servlet going to the first JSP???

thanks in advance
  Beatriz

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to