View Single Post
Old 12-19-2012, 05:12 PM   PM User | #1
angst
Senior Coder

 
angst's Avatar
 
Join Date: Apr 2004
Location: Toronto, Ontario
Posts: 2,112
Thanks: 15
Thanked 122 Times in 122 Posts
angst is on a distinguished road
Question JQuery drag & drop issue

Hello,

I've setup a drag and drop script ( http://jqueryui.com/sortable/#portlets ) to set the order of images displayed on a page.

the issue is that after I finish moving the items to the order I want them in, any items that were moved loose they're input values when I submit the changes.

for example;
PHP Code:
<div id='ImageBlock_1' class='ImageBox'>
<
label><input type='checkbox' name='SelectedImage[]' id='SelectedImage' value='http://www.allaxess.com/wp-content/uploads/2011/09/gibson-pic1.jpg' />
Use 
Image<br /><img src='http://www.allaxess.com/wp-content/uploads/2011/09/gibson-pic1.jpg' width='150' id='1' />
</
label
each checkbox has an image url set in the value. if I don't rearrange the boxes then the URL stay intact, however if they are moved, only the first URL appears in the submitted array.

any ideas?

Last edited by angst; 12-19-2012 at 05:15 PM..
angst is offline   Reply With Quote