Hey again,

webgodjj a écrit :
> Here is the new code, which doesn't seem to do any updating...:
> 
> <div id="imageFloatContainer">
> <?
> PHP CODE TO GRAB PHOTOS WITH THE ID BEING in the form of id="image_1"
> CREATING THIS LIST:
> <img src="http://fashdax.com/gallery/I/2005/01/01/thumb/3.jpg";
> id="image_3">
> <img src="http://fashdax.com/gallery/I/2005/01/01/thumb/4.jpg";
> id="image_4">
> <img src="http://fashdax.com/gallery/I/2005/01/01/thumb/5.jpg";
> id="image_5">
> ?>
> </div>

Let me rephrase...

Your IDs must be of the format blahblah_actualIDValue.  So here, your
values will be 1, 3, 4 and 5.  Sortable.serialize, based on your
Sortable.create call:

> Sortable.create('imageFloatContainer',
> {tag:'img',overlap:'horizontal',constraint: false, onUpdate :
> updateOrder});

Does not have a specified param name, so it will take your element's ID:
'imageFloatContainer', as a param name.  Sortable.serialize will then
create a sequence like this (herebelow, IFC stands for the full name,
for the sake of brevity in this post):

IFC[]=1&IFC[]=3&IFC[]=4&IFC[]=5

(for an unmodified order, say).

You know, as I do, that PHP will build an array from this, which is
convenient for your code.

One way to go is to have your PHP code log its request params somewhere
for you to see!  Better yet: use Firebug to trace XHR's to your server
side, in order to check what params are sent in.  By doing that, you
would already have seen, for instance, that sent values do *not* include
the prefix in the IDs.

'HTH,

-- 
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to