Forum: Ruby on Rails weird problem with draggable_element in a partial rhtml

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.
F1a132bd8360c35d1c6f69dfed11f194?d=identicon&s=25 Barthelemy Von haller (barthelemy)
on 2006-04-07 12:02
Hi all,

I have an index.rhtml page which calls a partial called _tasks.rhtml. In
the latter i call <%= draggable_element("icon#{@tasks.id}", :revert =>
true)%>. The first display of my page works fine and I get
<script type="text/javascript">
//<![CDATA[
new Draggable("icon32", {revert:true})
//]]>
</script>

But then if I have an ajax call to a function which will update the
partial 'tasks', everything is fine appart from the draggable which
doesn't appear at all. Just a blank line. And if I escape (<%=h...) the
draggable element I get exactly what I want.

Does anybody have a clue on what is happening ?

Thanks in advance

Barth
This topic is locked and can not be replied to.