i have this js code
[HIGHLIGHT=JavaScript]
function saveImageOrder()
{
var orderString = "";
var objects = document.getElementsByTagName('DIV');
for(var no=0;no<objects.length;no++){
if(objects[no].className=='imageBox' || objects[no].className=='imageBoxHighlighted'){
if(orderString.length>0)orderString = orderString + ',';
orderString = orderString + objects[no].id;
}
}
document.getElementById('debug').innerHTML = 'This is the new order of the images(IDs) : <br>' + orderString;
}
[/HIGHLIGHT]
and this is my php code
<?php do { ?>
<div class="imageBox" id="<?php echo $row_Recordset1['gallery_fotos_id']; ?>">
<div class="imageBox_theImage" style="background-image:url('<?php echo $row_Recordset1['gallery_fotos_img']; ?>')"></div>
<?php echo $row_Recordset1['gallery_fotos_id']; ?>
</div>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
my problem that i want to update the ID's of the images with the Id's given in the orderString
This is the new order of the images(IDs) :
imageBox1,imageBox0,imageBox2,imageBox3,imageBox4,imageBox5,imageBox6,imageBox7,imageBox8,imageBox9,imageBox10,
imageBox11,imageBox12,imageBox13,imageBox14,
am using this form
<FORM name="myForm" action="" method="post">
<INPUT type="hidden" name="imageIdList">
<input type="button" style="width:100px" value="SET ORDER" onClick="saveImageOrder()">
</FORM>
Please can u tell me how can i update them????
this is for a drag a drop gallery photos and i want the user able to save the changes he/she made