javascript - PLupload image order on load -
first question here , apologize in advance if research wasnt thorough enough.
i using plupload retrieve images server fine, problem showing them in order in uploaded. image order while retrieving important fundamental part of application.
here code far retrieving:
ready: function() { plupload = $("#uploader").plupload('getuploader'); var files = new array(); $.get('data/funcs/retrieve.php', function(data) { <?php foreach($images $key => $val){ ?> files.push('<?php echo $val; ?>'); <?php } ?> files.foreach(function(entry) { var img = new moxie.image(); var url = o.resolveurl(entry); img.onload = function() { plupload.addfile(img.getasblob()); } //end image onload img.load(url); }); for(var = 0, upprevioussize = plupload.files.length - files.length, size = files.length; < size; i++) { files[i]["initialindex"] = (i + upprevioussize) * -1; } });
any appreciated.
Comments
Post a Comment