[Bese-devel] Validators manipulating stylesheets
Marijn Haverbeke
marijnh at gmail.com
Wed May 31 11:11:45 UTC 2006
Hi,
It seems there was a bug in javascript-invalid-handler that caused it to
just add the ucw-form-field-invalid class to elements without removing the
valid class. Maybe this works on some browsers, but on Firefox 1.5 under
Linux I didn't get any red borders around inputs in the example pages. I
modified the functions as follows (3rd and 4th lines are new):
(defmethod javascript-invalid-handler ((field t) (validator
validator))
`(unless (dojo.html.has-class (document.get-element-by-id ,(dom-id field))
"ucw-form-field-invalid")
(dojo.html.remove-class (document.get-element-by-id ,(dom-id
field))
"ucw-form-field-valid")
(dojo.html.add-class (document.get-element-by-id ,(dom-id
field))
"ucw-form-field-invalid")))
And now it works as expected for me.
Regards,
Marijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060531/75d58b68/attachment.html>
More information about the bese-devel
mailing list