Sortable is not defined

228 views
Skip to first unread message

gdfox

unread,
Aug 20, 2008, 1:32:01 PM8/20/08
to Prototype & script.aculo.us
Hi,

I have the following script:

<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js" type="text/javascript"></script>
<script>
Event.observe(window,'load',init,false);
function init() {
Sortable.create('listContainer',
{tag:'div',onUpdate:updateList});
}
function updateList(container) {
var url = 'ajax_update_position.php';
var params = Sortable.serialize(container.id);
var ajax = new Ajax.Request(url,{
method: 'post',
parameters: params,
onLoading: function(){$('workingMsg').show()},
onLoaded: function(){$('workingMsg').hide()}
});
}
function handleResponse(req) {
// this function will fire after the ajax request is
complete...but we have nothing to do here
}
</script>

I get the following error with firebug: Sortable is not defined

Any help is appreciated.

Greg

david

unread,
Aug 21, 2008, 8:24:06 AM8/21/08
to Prototype & script.aculo.us
Hi Greg,

tested your code and it works fine, in fact I have no such error :))
But a stupid question, do you have the 'dragdrop.js' file in the 'js'
directory ??
If none of answer satisfy you, do you have a live exemple ?

--
David

Gregory Fox

unread,
Aug 21, 2008, 8:29:13 AM8/21/08
to prototype-s...@googlegroups.com
Yes, I do...

Sincerely,
Greg
--
Gregory D. Fox * Liberty Web Hosting & Design
401-823-5252 * Fax: 401-828-7057
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Providing Internet Solutions Since 1996      
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reply all
Reply to author
Forward
0 new messages