Support forums
in

Javascript CuteWebUI_AjaxUploader_OnQueueUI - List Count

Last post 12-03-2009, 12:38 AM by cutechat. 2 replies.
Sort Posts: Previous Next
  •  11-25-2009, 10:55 AM 57421

    Javascript CuteWebUI_AjaxUploader_OnQueueUI - List Count

    Hi,
     

    I customized CuteWebUI_AjaxUploader_OnQueueUI. Everything was working fine until i tested with 2 multiple files in a row. If I upload a few files, my list count in CuteWebUI_AjaxUploader_OnQueueUI reflects how many files im uploading. If I do a second one, without refreshing, my total list count is the sum of both uploads. Is there a way around that or I have to change my code to take that in consideration.

    I also have a few generic question, I read the API, I just want to make sure I understand
    1. If I am customizing my own queue display I dont need to use a uploaderAttachments? My undertsanding is that the difference between the uploader and the uploaderAttachments is one shows a list like gmail and the other one dosnt, but since im making my own, Im good to go with the uplaoder control?
    2. Ive looked at javascript section in the API, and there is an example where the control is placed in a variable like this (var uploader=document.getElementById("<%=UploadAttachments1.ClientID %>");). I cant get it to work, (with my ID), is it because my code is an external .js file or it needs in a script tag of the aspx page. Ive worked around by defining the CuteWebUI_AjaxUploader_FUNCTIONS, but Id like to apply my defined functions with uploader.handlequeueui=myqueueuihandler;
    3. I also have a similar problem with a custom cancel button. Ive managed to do a custom upload button with the InsertButtonID, but I have problems with the CancelButtonID. My guess is that it depends when the assigned button is generated. The insert button is generated on my "onLoad" (using ExtJS, so its more on the OnReady function) and it works. the cancel button is generated in a global section of a .js, which is included in my aspx file. Is there an order on how I have to create my custom UI items or i can do it on runtime with, lets say, a  document.createElement("anyEelement"); and specify the cancel ID.
    Thanks in advanced, Ive managed to do an entire customized upload widget using the ExtJS library using .NET web services. The control is good for that, Im just looking everywhere for javascript documentation and examples!
     
    Rafael 
     
     
     
  •  11-25-2009, 11:04 AM 57422 in reply to 57421

    Re: Javascript CuteWebUI_AjaxUploader_OnQueueUI - List Count

    I just realized I return false on the CuteWebUI_AjaxUploader_OnPostback because I dont need one, which dosnt reset the control. I update my view with a web service on CuteWebUI_AjaxUploader_OnTaskComplete function, so i dont need a post back. Is there a around that?
     
    rafael 
  •  12-03-2009, 12:38 AM 57550 in reply to 57421

    Re: Javascript CuteWebUI_AjaxUploader_OnQueueUI - List Count

    Rafael,
     
    For document , please check http://ajaxuploader.com/document/ , That document do not contains some new API
     
    1 - UploadAttachments control extends the server side uploaded items management, in client side, all uploader use same behavior.
     
    2 - you can do this to get the uploader object ,
     
    var uploader;
    function CuteWebUI_AjaxUploader_OnInitialize()
    {
        uploader=this;
        //all uploader will call this function , and you can filter the instance by the uploader.id
        uploader.handlerxxxx=myfunc;
    }
     
    3 - you can hide the buildin cancel button . (server side set CancelButton.Style["display"]="none";)  ,
      and call javascript uploader.cancelupload() at your button's event handler.
     
    Here is the method/event list , you can try it.
     
    uploader.internalobject (property , get the internal object , no document , and may be changed in future)
    uploader.cancelall()
    uploader.cancelupload()
    uploader.browseclick()
    uploader.startbrowse()
    uploader.startupload()
    uploader.setdialogfilter()
    uploader.setresumeoption()
    uploader.hidequeueui()
    uploader.getqueuecount()
    uploader.getitems()
     
    Event List :
     
    CuteWebUI_AjaxUploader_OnXxxxxx or uploader.handlerxxxxx=
     
      ("Postback");
      ("Progress");
      ("QueueUI");
      ("Browse");
      ("Select");
      ("Start");
      ("Stop");
      ("Initialize");
      ("MantleButton");
      ("Error");
      ("TaskStart");
      ("TaskError");
      ("TaskComplete");
     
    ---
     
    You can use uploader.cancelall() to reset the client state. 
     
    Regards,
    Terry
     
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems