Hi.
I am using Scriptaculous to create drag and drop functionality. I pasted the code I am using below. It’s functions almost exactly how the example on their website works. I would like to remove/change the onUpdate function so that it does not contact the server each time an item is dropped, I would rather have the script store it in an array or object that will be sent to process [I]after
Thanks for reading,
-Mike
[CODE] Sortable.create(
“<?php print MF_SORT_GALLERY_CONTAINER; ?>”, {
tag:’div’,
overlap:’horizontal’,
constraint: false,
onUpdate:function(){
new Ajax.Updater(
‘mfTalkBack’, // html element ID to feed AJAX response data into.
‘<?php print MF_SORT_GALLERY_AJAX_DOC; ?>’, // server-side script that handles request
{
onComplete: function(request){ new Effect.Highlight(‘ajaxResponseBox’,{endcolor:’#00ff00′, restorecolor:’#00ff00′}); },
parameters: Sortable.serialize(‘<?php print MF_SORT_GALLERY_CONTAINER; ?>’),
evalScripts: true,
asynchronous: true,
//onLoading: function(request){ new Effect.Highlight( ‘ajaxResponseBox’, {startcolor:’#ffffff’, endcolor:’#0000ff’, restorecolor:’#0000ff’} ); },
onFailure: function(request){ new Effect.Highlight( ‘ajaxResponseBox’, {startcolor:’#ffffff’, endcolor:’#ff0000′} ); }
}
)
}
}
)