[jquery-ui] Re: sortable serialize

2009-10-19 Thread Cyril Lopez
2009/10/18 wings david.mira...@gmail.com


 take a look at this:
 http://stackoverflow.com/questions/187073/jquery-sortables

 On Oct 8, 1:55 pm, Bert b...@oostdesign.nl wrote:
  jQuery(.sortable).sortable({ connectWith: .sortable }):
 
  Next I want to have some array (in php) like this:
 
  array(
  'block_1' = array(
   0 = 1,
   1 = 2,
   2 = 3
  ),
  'block_2' = array(
   0 = 4
  ),
  'block_3' = array(
   0 = 5,
   1 = 6
  )
  )
 


Try :

$('.sortable').sortable(
  {
[...]
update: function(event, ui) {
  $.post('/url.html',$(this).sortable('serialize'),
function(data){
  [...]
});
}
  }
);

Cyril, Nethik

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~--~~~~--~~--~--~---



[jquery-ui] Re: sortable serialize

2009-10-18 Thread wings

take a look at this: http://stackoverflow.com/questions/187073/jquery-sortables

On Oct 8, 1:55 pm, Bert b...@oostdesign.nl wrote:
 Hi there,

 I have three sortable lists like:

 ul id=block_1 class=sortable
     li id=listitem_1Content/li
     li id=listitem_2Content/li
     li id=listitem_3Content/li
 /ul

 ul id=block_2 class=sortable
     li id=listitem_4Content/li
 /ul

 ul id=block_3 class=sortable
     li id=listitem_5Content/li
     li id=listitem_6Content/li
 /ul

 And I have put this javascript on it:

 jQuery(.sortable).sortable({ connectWith: .sortable }):

 Next I want to have some array (in php) like this:

 array(
     'block_1' = array(
          0 = 1,
          1 = 2,
          2 = 3
     ),
     'block_2' = array(
          0 = 4
     ),
     'block_3' = array(
          0 = 5,
          1 = 6
     )
 )

 I've tried a lot of options with the jQuery().sortable('serialize')
 but I don't get the right response... can someone tell me how to do
 this?

 Regards, Bert

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~--~~~~--~~--~--~---



[jquery-ui] Re: sortable serialize disables sorting/dragging

2009-02-12 Thread aguido

nevermind, i found the problem with my implementation, thanks.

On Feb 12, 1:04 am, aguido agu...@gmail.com wrote:
 with the code used below (clipped some for readability), i lose the
 ability to drag and drop my list items, when i remove the 'serialize,
 {key: 'order'} from the .sortable(). i regain dragging and dropping,
 can anyone help me find the problem with my implementation?

         script type=text/javascript src=../js/jquery.js/script
         script type=text/javascript src=../js/jquery-ui-
 personalized-1.5.3.js/script

         script type=text/javascript
         $(function() {
                 var result = $(#gallerySort).sortable('serialize', { key:
 'order'});
         });
         /script
         ul id=gallerySort
                           LOOP START
                           print '       li id=positions_'.$picCounter.'
 class=sortableLIST OBJECT/li';
                           LOOP END
         /ul
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~--~~~~--~~--~--~---