Topic: in_place_editor + :script=>true not evaluating JS
Hi,
With Rails 2.0.2 (prototype 1.6.0.1 and 1.6.0.2)
In my view I have
<span id='cd_<%=cd.id%>'><%= v %></span>
<%= in_place_editor "cd_#{cd.id}", :script=>true , :url=>{:action=> :edit_value,:controller=> 'custom_data',:id=> cd.id} %>
And in my RJS I have
page.alert "hello"
page.replace_html "cd_#{@cd.id}", 'TEST'
The alert works, but instead of evaluating the replace_html part, the in place editor changes its text to
try { alert("hello"); Element.update("cd_31", "TEST"); } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('alert(\"hello\");\nElement.update(\"cd_31\", \"TEST\");'); throw e }I tried replacing the *.js script.aculous files in public/javascripts with the ones from an earlier Rails project (prototype 1.5) and everything works as it should. Am I the only one with this problem ?
Last edited by henrijones2 (2008-02-07 13:10:26)