Sortable.serialize returns a string formatted as name/url-encoded  
value pairs.  If you want to add parameters, append to the parameters  
string.

e.x.
// post is default value, not needed
var options = {
   parameters : Sortable.serialize('contenus_list',2) + '&foo=bar'
   // + '&' + Form.serialize('myFormId').toQueryString()
};


TAG

On Jul 31, 2007, at 2:29 AM, pibrom wrote:

>
> hi,
>
> I use scriptaculous sortable elements.
> I wish to send to the sort SQL request more parameters than my
> sortable list, because my MySQL table integers both element_id to
> sort, ranking for this element, and family_id.
> I wish to send to my update request this family_id by POST.
>
> this is the AJAX script :
> function updateOrder()
>             {
>                 var options = {
>                                 method : 'post',
>               parameters : Sortable.serialize('contenus_list',2)
>                               };
>
>                 new Ajax.Request('processor.php', options);
>             }
>
>             Sortable.create('contenus_list', { onUpdate :
> updateOrder });
>
> How can I add another parameter in the Ajax.Request, different from
> the sortable.serialize ?
>
> Thanks for your answers.
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to