View Single Post
  #2 (permalink)  
Old 06-11-2007, 10:39 PM
Daniel Daniel is offline
Member
 
Join Date: Jun 2007
Posts: 92
Daniel is on a distinguished road
RE: Javascript and enter button
The form has an event "onsubmit" (like the input that have onclick), the idea would be that event calls your validation function.
Check this, I think that it is the solution

Code:
<script language="Javascript" type="text/javascript"> function validateForm(){ ... } </script> <form method="post" name="createform" onsubmit="validateForm()"> ... </form>
Daniel
Reply With Quote