# sortable\_element-onUpdate

**URL:** <https://www.ruby-forum.com/t/sortable-element-onupdate/184967>\
**Category:** Rails\
**Created:** [March 11, 2010, 6:19am UTC](https://www.ruby-forum.com/t/sortable-element-onupdate/184967 "2010-03-11T06:19:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![priyadharsini](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a8b319/32.png) [@priyadharsini](https://www.ruby-forum.com/u/priyadharsini)\
**Post date:** [March 11, 2010, 6:19am UTC](https://www.ruby-forum.com/t/sortable-element-onupdate/184967/1 "2010-03-11T06:19:35Z")

</div>

Hi All,

Please check the below code and let me know whats the problem with the  
code.

\<%= sortable\_element(“parent\_drag”,:tag=\>“div”,:handle=\>“legend”,  
:dropOnEmpty =\> true, :constraint=\>false,:onUpdate=\>“function(){return  
reorder\_collection();}”) %\>

I’m trying to call a JS function, but its not working.

Thanks & Regards,  
Priyadharsini T
