Hi all:

I'm using sortable (very cool stuff!) on a series of divs with an
onUpdate callback.  Everything appears to work alright until I try to
pass a parameter to my callback function like this:

Sortable.create( 'page_33',
  {
     tag: 'div',
     onUpdate: updateOrder('page_33')
  }
);

When I pass that parameter to the updateOrder function (as opposed to
just using the updateOrder function without a call back) I get the
following error in my JavaScript console:

"Options has no properties (dragdrop.js line 870)"


My call back function looks like this:

function updateOrder(elementid)
{
    var options = {
        method : 'post',
        parameters : Sortable.serialize(elementid)
    };

    new Ajax.Request('test.php', options);
}

I would greatly appreciate if anyone has any suggestions as to how I
might successfully pass a parameter to my updateOrder function without
causing the Scriptaculous stuff to crash and burn.

I'm willing to bet that this is all just because of my general lack of
experience with JavaScript but I'm hoping I might be wrong (just this once).


Thank you in advance,

Matt
-- 
Matt Adams
Developer, Cypress Interactive
http://www.cypressinteractive.com


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

Reply via email to