Forum: Ruby on Rails Removing the fieldwitherrors div using RJS

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B03fe66e073383a72c81f66fa3463417?d=identicon&s=25 Radu Spineanu (Guest)
on 2007-05-21 23:01
(Received via mailing list)
I have a form in which one field can be validated using RJS.

If the user hits 'submit' and that field is invalid it will return
something like :
<div class='fieldwithErrors'><input name="cc[coupon]" size="30"
type="text" id="cc_coupon" value="xxxxxx" /></div>

Using AJAX the entered data could at one point become valid and then I
need to remove the 'fieldwitherrors' div(which places a red background
around the input field) with something else using RJS.

Any ideas how I could do this?

Radu Spineanu
This topic is locked and can not be replied to.