Hello all,

I'm using Scriptaculous 1.6.1 on a project I'm developing. My generated HTML (generated by PHP) looks something like this:

<ul id="admin-list">
    <li id="li-13">Singletary, Bob (President/CEO)</li>
    <li id="li-12">Chatman, Jim (Vice President of Finance/CFO)</li>
    ...
</ul>
<script type="text/javascript">
Sortable.create('admin-list', { onUpdate: function() { alert ('Updated!'); } });
</script>

When the page loads, I can drag and drop the LI nodes, as expected. However ... the onUpdate event never seems to fire, as I never get an alert.

If I change the onUpdate to onChange, it fires fine, of course each time an LI node changes position.

The odd thing is that I've successfully used very similar code in a previous project, in several places, with no problem. I'm at a complete loss here ... I've looked over the code for a few minutes for several days now, and can't see anything obvious I'm doing wrong.

Ideas?

Thanks,
Jeremy
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to