This is a migrated thread and some comments may be shown as answers.

deleteFileInputAt method throws exception in IE

2 Answers 72 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Brent
Top achievements
Rank 1
Brent asked on 29 Nov 2010, 07:25 PM
I am having an issue where the client-side method deleteFileInputAt() method is throwing an exception when I pass in a zero in the OnClientFileUploaded event.  It only does this in Internet Explorer.  Firefox works just fine, or at least it is not throwing an exception.  Any ideas please?

I have tried first calling the getUploadedFiles() method to check the count prior to calling the deleteFileInputAt(), but oddly I get a javascript error saying that the getUploadedFiles() method does not exist.  I am frustrated.

Here is the function I am call in the OnClientFileUploaded event.

 

 

function resumeFileUploaded(sender, args) {

 

sender.deleteFileInputAt(0);

}

2 Answers, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 02 Dec 2010, 03:47 PM
Hello Brent,

Are you using RadUpload or RadAsyncUpload?
The code below works for RadAsyncUpload:

<telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" Skin="WebBlue" OnClientFileUploaded="fileUploaded">
</telerik:RadAsyncUpload>
       <script type="text/javascript">
        function fileUploaded(sender, eventArgs)
        {
            alert(sender.getUploadedFiles().length)
            sender.deleteFileInputAt(0);
        }
         
       </script>

Regards,
Helen
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Brent
Top achievements
Rank 1
answered on 16 Dec 2010, 06:29 PM
For some reason, I am not seeing this issue anymore.  I obviously must have had something wrong, or something else has changed which corrected the problem.
Tags
Upload (Obsolete)
Asked by
Brent
Top achievements
Rank 1
Answers by
Helen
Telerik team
Brent
Top achievements
Rank 1
Share this question
or