Hi,
I am not sure I am clear on what you mean. If you send a request to the
server to store some stuff in a database, then I would say "redirect" to a
page that says successful. Otherwise, the way I would do it if the server
returned with the same page that submitted the form in the first place, I
would do something like:
<%
if( result > 0 )
{
%>
<script language="javascript">
win = window.open(...);
</script>
<%
}
%>
By this I mean, if the server was submitted a form from this page, it would
somehow have to set a "flag" to indicate that it was successful or not. In
your JSP page, which is on the server, it would "check" for this flag..in my
example I use the result variable. Now, upon returning with this page, if
the result was > 0 in this case, it would include in the returned page an
"inline" javascript routine that would open up a window. You could also use
alert("Successful") or whatever else you want. My personal preference is to
forward to a GOOD page, instead of the same page with an alert.
Hope that helps.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets