Brian Slezak wrote:
>
>     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?

The default behavior for a submit button in an HTML form is to send a
request for the URI specified by the form's action attribute (with all
the values entered in the form fields as parameters). So if you specify
a JSP page as the action, the JSP page will be executed by the web
server.

If you, however, want to exeute some code in the browser *before* the request
is sent to the web server (or instead of), you need to use JavaScript code.

Keep in mind what type of code executes where: code in a JSP page is executed
on the server when the page is requested, JavaScript executes in the browser,
triggered by some user interface event such as a button being clicked. Pick
the technology that meets your application demands for each task.

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.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

Reply via email to