Forum: Ruby on Rails In Place Editor and RJS

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Laurent (Guest)
on 2007-05-02 14:54
(Received via mailing list)

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
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)

This topic is locked and can not be replied to.