No items required

  •  01-21-2012, 7:52 AM

    No items required

    Hi,
     
    I have an uploader on a page with other data.
    Uploading items is optional. But if no items are selected my page won't postback (and the rest of the data cannot be saved).
    Where do I set that uploading of images is optional in the ajaxuploader?
     
    this is my code:
     
    1. <script type="text/javascript">  
    2.   
    3.             function submitbutton_click() {  
    4.                 var submitbutton = document.getElementById('<%=btnSave.ClientID %>');  
    5.                 var uploadimg = document.getElementById('<%=uplImages.ClientID %>');  
    6.                 var uploadobj = document.getElementById('<%=uplAttach.ClientID %>');  
    7.                 if (!window.filesuploaded) {  
    8.                     if (uploadobj.getqueuecount() > 0) {  
    9.                         uploadobj.startupload();  
    10.                     }  
    11.                     if (uploadimg.getqueuecount() > 0) {  
    12.                         uploadimg.startupload();  
    13.                     }  
    14.                     return false;  
    15.                 }  
    16.                 window.filesuploaded = false;  
    17.                 return true;  
    18.             }  
    19.   
    20.             function CuteWebUI_AjaxUploader_OnPostback() {  
    21.                 window.filesuploaded = true;  
    22.                 var submitbutton = document.getElementById('<%=btnSave.ClientID %>');  
    23.                 submitbutton.click();  
    24.                 return false;  
    25.             }  
    26.         </script>  
    Any help would be appreciated
     
    thx 
View Complete Thread