onClick="somefunction()"

function somefunction() {
   validation_goes_here
   submit();
}

On Wed, 27 Mar 2002, Tim wrote:

> I have a form that I wanted to restrict so that the user has to hit the Submit 
>button to enter the form, and not the Enter key.  I included the following:
> 
> <input type="button" name="Submit" Value="Submit Request" onClick="form.submit()">
> 
> This does work as far as resticting the Enter Key, but the Required attribute does 
>not work now.  The user does not get a message if a required field is left blank, and 
>the form is acted upon, producing errors.  If I take the above code out and insert a 
>plain submit button, the Required attribute works, but not restricting the Enter key.
> 
> Anyone have an idea on how to do both, restrict form submission only when the button 
>is selected and checking for required fields?
> 
> Tim
> 
> 
> 
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards�
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to