In case anybody else searches for this information in the future, I was
able to get Scriptaculous sortable and serialize to work with AJAX and
and use the information from the serialize to update by database.
Create a form in your view like this:
<form onSubmit="return false;">
<?php
echo $html->hidden('Item/hiddeninput',
array('id'=>'hiddentextarea')); //hidden item in the form where I
store the return value from the javascript function called by the
"before" variable in the ajax helper below
print $ajax->submit('Submit Changes',
array('url'=>'updateitemorder', 'update'=>'itemtable',
'before'=>'getGroupOrder()'));
?> //ajax submit button, getGroupOrder is
called once the button
is pressed but before the request is initiated
</form>
My getGroupOrder() javascript function serializes my sortable list and
returns the values as a "string" separated by &'s for tokenization in
my contoller class "updateitemorder" . "updateitemorder" is able to
access the string with the following statement:
$args=$this->params['data']['Item']['hiddeninput']; //$args now
contains the data that was in 'hiddeninput' from the form
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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/cake-php
-~----------~----~----~----~------~----~------~--~---