# In Place Editor and RJS

**URL:** <https://www.ruby-forum.com/t/in-place-editor-and-rjs/103150>\
**Category:** Rails\
**Created:** [May 2, 2007, 12:54pm UTC](https://www.ruby-forum.com/t/in-place-editor-and-rjs/103150 "2007-05-02T12:54:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurent](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ce7236/32.png) [@laurent](https://www.ruby-forum.com/u/laurent)\
**Post date:** [May 2, 2007, 12:54pm UTC](https://www.ruby-forum.com/t/in-place-editor-and-rjs/103150/1 "2007-05-02T12:54:59Z")

</div>

Hello,

I have extended the InPlaceEditor (as in Chad F. Book Rails  
Recipes) to do a In Place Select Editor

I display a data table : i have two cells , one for a code, one for a  
Label.  
I Opened the Label with in place select editor…  
When clicking, a combo is displayed, i choose another value, then OK  
to Update.

But, for the response , i need to update , the label and the code  
(displayed in another cell)  
I used RJS for this.  
In the RJS code , i replace the HTML for the span including the Code,  
then i replace the HTML for the span including the Label.  
My problem is that finally the generated Javascript code is displayed  
in the Label span.

I understand the div or span concerned by the in\_place\_editing, is the  
one to be updated …  
But to workaround this behaviour, should i modify the javascript code  
from my InPlaceSelectEditor, to include another ‘hidden’ div in which  
i will write the response (in my case, Javascript code)

Laurent
