- Prototype Tutorial
- Prototype - Home
- Prototype - Short Overview
- Prototype - Useful Features
- Prototype - Utility Methods
- Prototype - Element Object
- Prototype - Number Processing
- Prototype - Strings Processing
- Prototype - Array Processing
- Prototype - Hash processing
- Prototype - Basic Object
- Prototype - Templating
- Prototype - Enumerating
- Prototype - Event Handling
- Prototype - Form Management
- Prototype - JSON Support
- Prototype - AJAX Support
- Prototype - Expressing Ranges
- Prototype - Periodical Execution
- Prototype Useful Resources
- Prototype - Quick Guide
- Prototype - Useful Resources
- Prototype - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Prototype - Form.Element Management
127 Lectures 11.5 hours
Form.emement is a submodule of Form which deals with specific form controls on INPUT, SELECT and TEXTAREA elements.
Form.Element is also aliased Field. Following two forms are equivalent −
Form.Element.activate('myfield') is equivalent to: Field.activate('myfield'); Which in turn equivalent to: $('myfield').activate()
Here is a complete list of all the methods related to Form.Element.
Prototype Event Methods
NOTE − Make sure you at least have the version 1.6 of prototype.js.
|S.No.||Method & Description|
Gives focus to a form control and selects its contents if it is a text input.
Clears the contents of a text input.
Disables a form control, effectively preventing its value to be changed until it is enabled again.
Enables a previously disabled form control.
Gives keyboard focus to an element.
Returns the current value of a form control. A string is returned for most controls; only multiple select boxes return an array of values. The global shortcut for this method is $F().
Returns true if a text input has contents, false otherwise.
Selects the current text in a text input.
Creates an URL-encoded string representation of a form control in the name=value format.