handleselect javascript method

  •  10-29-2009, 2:49 PM

    handleselect javascript method

    I am having trouble using your javascript API. I am trying to check if a file already exists in our system, as a user is attempting to upload a file. If it does exist, I need to give them a message asking if they want to overwrite the file. I am trying to use the handleselect method to grab the files that are being uploaded, but i can't seem to get the list of files being uploaded. Here's the code I'm using:

    uploader.handleselect =
    function() {
    alert(
    'handleselect');
    var items = this.getitems();
    alert(
    'Files selected: ' + items.length);
    return false;
    };
     
    If I use the CuteWebUI_AjaxUploader_OnSelect method, I can get to the files from the "files" parameter, but i think i need to use the handleselect method since i am trying to filter the list of files, then start the upload manually using startupload( ), which by the way doesn't seem to fire when i call it from another javascript method.
     
    Any ideas on how i can get to that list of files from handleselect, and also call startupload? Is there an on-line reference of the javascript methods available on the Uploader object, one that's more complete than http://ajaxuploader.com/document/index.htm#page=JavaScript-API.htm?
     
    Thanks...
View Complete Thread