Hai everybody,

I need help,

i doing arrange images in two choices

one is random
another one is image taken date and time value

responseJSON return the imagetaken object

how to sort images according to time(descending order);

anybody plz help me.

var c;
    var pCrop;
    var crop_api;
    var rotate = false;
    var temp;
    var tempZIndex;
    var fileSizeOption = "";
    var filecount=new Array();
    var imgCount = 0;
    var imgList = new Array();
 filecount =0;
    $(document).ready(function()
    {
        var uploader = new qq.FileUploader(
        {
            element: document.getElementById('btnUploadPlanPicture'),
            action: upload_url,
            params: 
            {
                album: album,
                type: 'plan',
                desc: 'plan',
            },


            allowedExtensions: ['jpg','png','gif'],
             onSubmit: function(id, fileName) {


                         },

            onComplete: function(id, fileName,responseJSON)
            {   
                  alert(responseJSON.imagetakendate);
                   fnOpenDialog(responseJSON); 
                imgList[imgCount++] = responseJSON.id;
                createPlanspaceImage(responseJSON);

                return true;
            },

            onAllComplete: function(status)
            {   

                ArrRandomly(imgList)
                imgCount = 0;
                imgList = new Array();

            }

        });




    });

    function ArrRandomly(listImage)
    {
    // alert(listImage);
    for (var i = listImage.length - 1; i > 0; i--) {
        var j = Math.floor(Math.random() * (i + 1));
        var temp = listImage[i];
        listImage[i] = listImage[j];
        listImage[j] = temp;
    }
     return listImage;

You will can execute sort on the server, during the selection a data of data base

hai,

this imagetakendate not store in database.