Special Offer - Get $90 Discount and Host Your Dream Web Site @ Dreamhost for 1 Year Click Here. Promo Code SLJ345
Back To Top
WordPress Web Application Development
Develop Powerfull Web Applications Using Cutting Edge WordPress Development Techniques

Jquery Enable Disable Form Submission on Enter Key Press

on 2011/04/24 8:34 AM stored in: Uncategorized and tagged:

Jquery Enable Form Submission on Enter Key Press

Making the form submission on enter key press increases the user friendliness of the form. Jquery event handlers can be used to achieve this functionality.


                
                

                

Execute a Function on Form Submission

We can execute any function before submitting the form to the server.Jquery submit() method can be used in this situation. This method is equal to the
functionality normal javascript onsubmit() function.


Disable Form Submission on Enter Key Press

Normally once you click a form field and press the enter key, the form submission will be done automatically. sometimes you may want to prevent this default behavior. You can easily stop the form submit by handling the enter key press as given below.


Prevent Form Submission Until Form Fields are Validated

Since security is a major concern in modern web applications, you have to validate the input data before sending to server. You can do the validations inside
the submit method and return false to stop submit if the form contains any errors.


Leave a Reply

Follow Us On Facebook