Forum: Ruby on Rails In Place Editor and RJS

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B1415e872f86d771167c48a0832f583b?d=identicon&s=25 Laurent (Guest)
on 2007-05-02 12:54
(Received via mailing list)
Hello,

I have extended the InPlaceEditor (as in Chad Fowler 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
This topic is locked and can not be replied to.