Errors with GetFileInputs() and GetRadUpload()

Thread is closed for posting
4 posts, 0 answers
  1. Tony
    Tony avatar
    40 posts
    Member since:
    Jul 2007

    Posted 04 Aug 2008 Link to this post

    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.
  2. Tony
    Tony avatar
    40 posts
    Member since:
    Jul 2007

    Posted 05 Aug 2008 Link to this post

    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"

  3. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 05 Aug 2008 Link to this post

    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.
  4. Tony
    Tony avatar
    40 posts
    Member since:
    Jul 2007

    Posted 05 Aug 2008 Link to this post

    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
Back to Top