I'm not sure of this but can't you connect it to an javascript event? document.form.onsubmit(myfuction)
As I said, I don't know if there is a onsubmit event on the form, but if it is, I would recomend it... Another way to do it is to have the go button make the function call (I't probably how you do it today, i'm not sure) <input type="submit" name="submit" value="Go" onClick="return checkAll()"> the function returns false if something is wrong and true otherwise... Since the submit always is run (even if enter is pressed) you will run this function. return is used so the submit is canceled if there is something wrong (you don't want to give a error message and then continue) Hoped it helped.. // Jan Areno -----Ursprungligt meddelande----- Fran: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]For ShriKant Vashishtha Skickat: den 13 december 2001 08:27 Till: [EMAIL PROTECTED] Amne: Urgent !!!!!!!! Please help me Hi, My JSP contains the following things A text box and a GO button which fetches the result based on the criteria entered in textbox. The GO button has a validation for a blank search criteria and displayes alert message if we press GO without entering anything. But the problem is, if I hit on ENTER, it fetches me the result even if I haven't entered anything in the text box. It does not go through the validation which executes on pressing on GO button. Please help........... -ShriKant =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com