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

Errors with GetFileInputs() and GetRadUpload()

3 Answers 232 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 05 Aug 2008, 02:17 AM
I'm trying to right a simple client side check to make sure that atleast one file is uploaded.

But I've come across 2 problems
First:
var fileInputs = GetRadUpload('<%= RadUpload1.ClientID %>'); 


which is used in many examples doesn't seem to work.  I've over come this by using:
var radUpload = $find("<%= RadUpload1.ClientID %>"); 

But was wondering why GetRadUpload wouldn't be working.


Second:
Once I've found the control with $find, its giving me the error:
"Object doesn't support this property or method", in reference too: GetFileInputs()


here is my script:

function checkUploadFileInput2()     
{     
    var radUpload = $find("<%= RadUpload1.ClientID %>");  
    var fileInputs =  radUpload.GetFileInputs();     
    alert(fileInputs[0].value);  
}   


Thanks in advance for any help you can give.

3 Answers, 1 is accepted

Sort by
0
Tony
Top achievements
Rank 1
answered on 05 Aug 2008, 06:12 AM
ARG!!!!!!!!!!!
There are days when I really wish javascript didn't exist.

problem 1:
"GetRadUpload" should actually be "getRadUpload"

problem 2:
"GetFileInputs" should actually be "getFileInputs"

0
Atanas Korchev
Telerik team
answered on 05 Aug 2008, 06:14 AM
Hi Tony,

You seem to be using RadUpload for ASP.NET Ajax but still referring to the client-side API of RadUpload Classic. Please check this help topic which explains the changes between those two versions.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Tony
Top achievements
Rank 1
answered on 05 Aug 2008, 06:19 AM
ahh ok, so I did actually have the right code to start with, only for the old version. It was just changed slightly within the Ajax version.

Thks
Tags
Upload (Obsolete)
Asked by
Tony
Top achievements
Rank 1
Answers by
Tony
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or