Posted by Oak Hall on 09/07/05 20:11
Thank you both. Got it with the hidden field.
"Hilarion" <hilarion@SPAM.op.SMIECI.pl> wrote in message
news:dfkdnp$8j$1@news.onet.pl...
>>> 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]
|