Start Upload on custom button click

Mar 2, 2009 at 11:20 AM
Hi,

I have written custom adapter to upload files into my database. Also I do want to upload the files on upload button of FileUploader control. Instead I wanted to upload files on some another button click as there are other operations also which I wanted to do.
I have done this using following

var fileUploadObj;<o:p></o:p>

function GenerateFileRowFunc(uploader, row, container)<o:p></o:p>

{<o:p></o:p>

    //GENERATING ROWS IN FILE LIST BOX<o:p></o:p>

    Flajaxian.generateFileRow(uploader, row, container);<o:p></o:p>

    fileUploadObj = uploader;<o:p></o:p>

    <o:p></o:p>

}//End of GenerateFileRowFunc<o:p></o:p>

<o:p> </o:p>

function  StartFileUpload()<o:p></o:p>

{<o:p></o:p>

    fileUploadObj.startUpload();<o:p></o:p>

}//End of StartFileUpload

 

 

However, it is uploading only first file and all remainig it is skiped. Can any one tell me how to process all other files or am I doing anythting wrong?

Regards,
Krunal
Coordinator
Mar 2, 2009 at 3:31 PM
<script>
function StartFileUpload(){
  // the FU1 is the server side control ID
  <%=FU1.ClientID%>.startUpload();
}
</script>
<fjx:FileUploader ID="FU1" runat="server"
    UploadButtonX="-300">
    <Adapters>
        <fjx:FileSaverAdapter Runat="server" FolderName="UploadFolder" />
    </Adapters>
</fjx:FileUploader>
<input type="button" value="Upload" onClick="StartFileUpload()" />