# Removing the fieldwitherrors div using RJS

**URL:** <https://www.ruby-forum.com/t/removing-the-fieldwitherrors-div-using-rjs/104729>\
**Category:** Rails\
**Created:** [May 21, 2007, 11:01pm UTC](https://www.ruby-forum.com/t/removing-the-fieldwitherrors-div-using-rjs/104729 "2007-05-21T23:01:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Radu\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ec9cab/32.png) [@Radu\_S](https://www.ruby-forum.com/u/Radu_S)\
**Post date:** [May 21, 2007, 11:01pm UTC](https://www.ruby-forum.com/t/removing-the-fieldwitherrors-div-using-rjs/104729/1 "2007-05-21T23:01:12Z")

</div>

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 :

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 S.
