# Sortable\_element - No HTML output

**URL:** <https://www.ruby-forum.com/t/sortable-element-no-html-output/92234>\
**Category:** Rails\
**Created:** [April 17, 2007, 11:15am UTC](https://www.ruby-forum.com/t/sortable-element-no-html-output/92234 "2007-04-17T11:15:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zayne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/51bf81/32.png) [@zayne](https://www.ruby-forum.com/u/zayne)\
**Post date:** [April 17, 2007, 11:15am UTC](https://www.ruby-forum.com/t/sortable-element-no-html-output/92234/1 "2007-04-17T11:15:28Z")

</div>

I’ve been trying to implement a sortable list and have been following  
the Rails Cookbook I’ve just bought. My code is exactly the same as the  
one in the book, but when I tried to move an element, I can only select  
the element. I then looked at the HTML source and there is no javascript  
being inserted into the page. The source in my view page looks like  
this:

\<%= sortable\_element(‘list’,  
:update =\> ‘order’,  
:complete =\> visual\_effect(:highlight, ‘list’),  
:url =\> { :action =\> “order” }) %\>

I’ve got the references to the javascript libraries in the layout page,  
but this shouldn’t affect Rails writing javascript to the page. Is there  
something I’m overlooking?

---

<div class="post-metadata">

**Author:** ![zayne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/51bf81/32.png) [@zayne](https://www.ruby-forum.com/u/zayne)\
**Post date:** [April 17, 2007, 5:07pm UTC](https://www.ruby-forum.com/t/sortable-element-no-html-output/92234/2 "2007-04-17T17:07:32Z")

</div>

Ok. I’ve managed to figure out that something about the environment is  
causing the problem. I’ve put exactly the same code in another Rails  
project and it does correctly generate the javascript in the html  
output.

Anyone know a solution?

---

<div class="post-metadata">

**Author:** ![zayne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/51bf81/32.png) [@zayne](https://www.ruby-forum.com/u/zayne)\
**Post date:** [May 10, 2007, 9:11pm UTC](https://www.ruby-forum.com/t/sortable-element-no-html-output/92234/3 "2007-05-10T21:11:22Z")

</div>

Did you ever figure this out? I’ve got the same problem.
