On Oct 27, 2006, at 8:00, Yehuda Katz wrote:
> So I'm working on various Rails solutions using jQuery and Interface.
> The way Rails/Prototype handles sortables is as follows:
> You have a series of id's in a list: item_2, item_4, item_1,
> item_3, etc.
> Prototype serializes as: item[]=2&item[]=4&item[]=1&item=3 etc.
I also agree that Prototype way is more intuitive. For Interface in
the receiving PHP script I ended up doing something like below. I
sortable items have id:s project_1, project_2 ...
-cut-
foreach ($_POST['projectlist'] as $key => $val) {
unset($params);
$params['id'] = str_replace('project_', '', $val);
...
-cut-
This is not however elegant solution.
--
Mika Tuupola
http://www.appelsiini.net/~tuupola/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/