# Replacing elements/changing attributes with 'remote\_function'?

**URL:** <https://www.ruby-forum.com/t/replacing-elements-changing-attributes-with-remote-function/138546>\
**Category:** Rails\
**Created:** [May 24, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/replacing-elements-changing-attributes-with-remote-function/138546 "2008-05-24T12:57:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hadmut](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6f9a4e/32.png) [@Hadmut](https://www.ruby-forum.com/u/Hadmut)\
**Post date:** [May 24, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/replacing-elements-changing-attributes-with-remote-function/138546/1 "2008-05-24T12:57:21Z")

</div>

Hi,

how could I replace more than just the innerHTML of an element with a  
remote function?

The given problem:

I’d like to update table row in a table of the style

...... ...

|
| |
|
| |

where not only the contents of the tr change, but the class attribut  
as well (e.g. to change the background color into red for alerting).

With the argument :update=\>:row1 I could replace the innerHTML,  
but not the class attribute.

How would I do this?

regards  
Hadmut
