Yes, there is a way to trigger the submit button. You may use JavaScript to
do that like this:
<form action="/foo/bar.jsp" onsubmit="return foobar()">
...
</form>
<script language="JavaScript">
function foobar() {
do.domething();
if (something.happened) {
form.submit();
} else {
alert("foo!");
}
return false;
}
</script>
>From: Brian Slezak <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Quick form question
>Date: Mon, 4 Sep 2000 13:25:21 -0500
>
> Is there a simple way to determine when the "submit" button has been
>pressed
>on a form with JSP, or do you need JavaScript for that sort of stuff?
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
===========================================================================
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