I have a method which prints out the order of a set of images...I need to submit this to a new php page.
I have a form which currently prints out the order to the same page.
<form action="mainpage.php" method="post">
<div style="clear:both;padding-bottom:10px">
<input type="Button" style="width:100px" value="Show order" onclick="saveImageOrder()">
</div>
Saveimageorder() shows the image and it saves the order in a variable called orderString
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;
}
Can anyone tell me how to do this?
thanks.