# Removing the fieldwitherrors div using RJS

**URL:** <https://www.ruby-forum.com/t/removing-the-fieldwitherrors-div-using-rjs/104623>\
**Category:** Rails\
**Created:** [May 20, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/removing-the-fieldwitherrors-div-using-rjs/104623 "2007-05-20T21:46:17Z")\
**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 20, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/removing-the-fieldwitherrors-div-using-rjs/104623/1 "2007-05-20T21:46:17Z")

</div>

I have a form in which one field can be validated using RJS.

If the user hits ‘submit’(which is via POST) 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.
