Wednesday, July 29, 2009

Re: Sortable using jQuery help

you might need to use the full base path in your ajax request

.post('http://mysite.com/entries/order/')

i ran into a similar problem using .load()

you can break into your code like this:

$("#sortable").sortable({
update: function() {
$.post('<?php echo $_SERVER['SERVER_NAME'] ?>/entries/order/
0/', $('.li').sortable("serialize", {key:
'li[]'}))
}

});

On Jul 29, 7:50 pm, "Dave Maharaj :: WidePixels.com"
<d...@widepixels.com> wrote:
> Has anyone implemented the sortable feature using jQuery UI?
>
> I found this onlinehttp://stackoverflow.com/questions/955438/jquery-sortable-in-cakephp-...
> t-ajax-part
>
> I  have the sorting part working but its not firing the ajax request to
> update the order.
>
> $("#sortable").sortable({
>     update: function() {
>         $.post('/entries/order/0/', $('.li').sortable("serialize", {key:
> 'li[]'}))
>     }
>
> });
>
> Ideas?
>
> Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: