- Prototype - Periodical Execution
- Prototype - Expressing Ranges
- Prototype - AJAX Support
- Prototype - JSON Support
- Prototype - Form Management
- Prototype - Event Handling
- Prototype - Enumerating
- Prototype - Templating
- Prototype - Basic Object
- Prototype - Hash processing
- Prototype - Array Processing
- Prototype - Strings Processing
- Prototype - Number Processing
- Prototype - Element Object
- Prototype - Utility Methods
- Prototype - Useful Features
- Prototype - Short Overview
- Prototype - Home
Prototype Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Prototype - Form Management
Prototype provides an easy way to manage HTML forms. Prototype s Form is a namespace and a module for all things form-related, packed with form manipulation and seriapzation goodness.
While it holds methods deapng with forms as a whole, its sub module
deals with specific form controls.Here is a complete pst of all the methods related to Form Element.
Prototype Form Methods
NOTE − Make sure you at least have the version 1.6 of prototype.js.
S.No. | Method & Description |
---|---|
1. | Disables the form as whole. Form controls will be visible but uneditable. |
2. | Enables a fully or partially disabled form. |
3. | Finds first non-hidden, non-disabled form control. |
4. | Gives keyboard focus to the first element of the form. |
5. | Returns a collection of all form controls within a form. |
6. | Returns a collection of all INPUT elements in a form. Use optional type and name arguments to restrict the search on these attributes. |
7. | A convenience method for seriapzing and submitting the form via an Ajax.Request to the URL of the form s action attribute. The options parameter is passed to the Ajax.Request instance, allowing to override the HTTP method and to specify additional parameters. |
8. | Resets a form to its default values. |
9. | Seriapze form data to a string suitable for Ajax requests (default behavior) or, if optional getHash evaluates to true, an object hash where keys are form control names and values are data. |
10. | Seriapze an array of form elements to a string suitable for Ajax requests (default behavior) or, if optional getHash evaluates to true, an object hash where keys are form control names and values are data. |