[cvs] commit: incubator/Horde_Form/js incrementalvalidator.js
Matt Warden
mwarden at gmail.com
Thu Aug 18 20:36:38 PDT 2005
mwarden 2005-08-18 20:36:38 PDT
Modified files:
Horde_Form/js incrementalvalidator.js
Log:
only remove form-error classification if passed incrementalvalidation (avoids flickering on slower machines). only remove error message if passed incrementalvalidation or if failed incremental validation and the errormessage is now different than the one currently displayed (avoids flickering on slower machines). also, only manipulate DOM if the value in the validation-result is the same as teh current value of the field. otherwise, the user might have changed the value to comlpy with the field type, but suddenly gets a message (based on the value when the validation request was sent) sayin that the value is invalid (even though it is now valid). an example here might be the email field, which requires certain characters. if validation request was sent on foo at bar. and the response is received when the user finished typing foo at bar.com, the system would have previously displayed an error about an invalid email address, even though by now it is valid (under certain conditions)
. this will no longer happen, as DOM manipulations do not occur if the value has changed.
Revision Changes Path
1.3 +57 -15 incubator/Horde_Form/js/incrementalvalidator.js
Chora Links:
http://cvs.horde.org/diff.php/incubator/Horde_Form/js/incrementalvalidator.js?r1=1.2&r2=1.3&ty=u
More information about the cvs
mailing list