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

ValidateExtensions() not working

3 Answers 54 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
sankardeep v
Top achievements
Rank 1
sankardeep v asked on 08 Jul 2010, 01:59 PM
Hey,
       I am using a multiple file  upload control in a rad window .
I have provided the server side validation using the allowedfileextensions property and it working well .
but my client side validation gives me problem and the ValidateExtensions() function is not working .


Error that i am getting is upload.ValidateExtensions is not a function.  the js code i used is below


function ValidateRadUpload1(source, arguments) {
    var upload= $find('<%= FileUpload.ClientID %>');

    arguments.IsValid = upload.ValidateExtensions();
}

Ascx.
 <telerik:radupload ID="FileUpload" runat="server" MaxFileInputsCount="5"
                MaxFileSize="102400000"  ToolTip="Select your File"
                AllowedFileExtensions=".doc,.xls,.txt,.docx,.xlsx,.rtf,.pdf,.jpg,.bmp"
                ControlObjectsVisibility="Default"   
                 EnableFileInputSkinning="True"
                 EnableViewState="False">
            </telerik:radupload>
<asp:customvalidator runat="server" id="CustomValidator1" display="Dynamic"
            clientvalidationfunction="ValidateRadUpload1"
                onservervalidate="CustomValidator1_ServerValidate" ValidationGroup="upload">
        Invalid extensions.
</asp:customvalidator>

Need help.


Sankardeep V

3 Answers, 1 is accepted

Sort by
0
sankardeep v
Top achievements
Rank 1
answered on 12 Jul 2010, 04:49 AM
Any one please help it very urgent.
0
Accepted
Yana
Telerik team
answered on 12 Jul 2010, 11:16 AM
Hello,

Actually the correct name of the function is: validateExtensions(), note that javascript is case-sensitive.

Best wishes,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
sankardeep v
Top achievements
Rank 1
answered on 12 Jul 2010, 12:11 PM
OOPssss.
My bad how did i missed that .
Any way Thanks YANA its very nice to see you are responding to this type of mistakes.
Thanks telerik team
Tags
Upload (Obsolete)
Asked by
sankardeep v
Top achievements
Rank 1
Answers by
sankardeep v
Top achievements
Rank 1
Yana
Telerik team
Share this question
or