JavaScript
A5.form.prepare Method
Do not use this method to prepare controls in the UX component.
Syntax
A5.form.prepare(form_id);
Arguments
- form_idstring
The ID of the form to prepare.
Description
Prepares an HTML form.
Discussion
An html form element must be "prepared" before the other functions can gather information. When the page is initialized, this function should be the first run. The function adds and populates a couple new attributes to every control such as "a5isdirty" and "a5originalvalue". These are required to allow the form to submit properly. When the form is initialized, the original value in the control is placed in "a5originalvalue" and "a5isdirty" is set to "false". The function also adds some event handlers to each control to set the value if "a5isdirty" to "true" if the value in the control changes.
Example:
< script type="text/Javascript" language="Javascript"> < !-- function onPageInitialize() {A5.form.prepare('my_FORM')} //--> < /script> < title>Title</title> < /head> < body onload="onPageInitialize()"> < form id="my_FORM" name="my_FORM" method="POST" action="">