Posted by Hilarion on 09/06/05 18:51
>> down with Javascript. When I submit the form I would like php to know what
>> order they are in, but it shows them in a different order then they where on
>> the screen. Any solution?
>
> I'm pretty sure that in the POSTed variables the order is undefined.
> You will have to provide additional hints in your form data.
>
> Perhaps your javascript, in addition to visually ordering the items,
> could populate an extra hidden form field with the desired order as a
> comma-separated string of item ids.
You could also do it without using hidden fields by modifying the values
of options when their order is changed (eg. use "pos|value" format
where "pos" is position number and "value" the desired option value).
It requires more PHP parsing, but does not require using additional
fields.
Hilarion
[Back to original message]
|