Hello,
I have a RadAsynchUpload control inside a div with style display:none.
When the user clicks a certain radio I switch the div to display:block. In this scenario the AllowedFileExtensions is ignored. If I put the upload control in a div with normal display it works.
Here is my code to reproduce the problem:
Javascript that handle showing div:
aspx and html for upload that doesnt show the fileextensions in the open dialog:
If I place an upload not in a div with display none it does work:
Any suggestions?
I have a RadAsynchUpload control inside a div with style display:none.
When the user clicks a certain radio I switch the div to display:block. In this scenario the AllowedFileExtensions is ignored. If I put the upload control in a div with normal display it works.
Here is my code to reproduce the problem:
Javascript that handle showing div:
<telerik:RadScriptBlock ID="rsb" runat="server"> <script type="text/javascript"> function toggleDiv(div, st) { $get('div' + div).style.display = st; } function validationFailed(sender, eventArgs) { $(".ErrorHolder").append("<p><span style='color:red;'>Het bestand '" + eventArgs.get_fileName() + "' is te groot.<br />De maximale bestandsgrootte is 100Mb per bestand. Upload afgebroken.</span></p>").fadeIn("slow"); } function filesSelected(sender, eventArgs) { } </script> </telerik:RadScriptBlock>aspx and html for upload that doesnt show the fileextensions in the open dialog:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="RadioButtons, Textbox, Checkboxes, Buttons" EnableRoundedCorners="false" Skin="Office2007" /><asp:RadioButton ID="rb0post" runat="server" GroupName="g0" Text="per post" TextAlign="Right" onclick="toggleDiv('0', 'none');" /> <br /> <asp:RadioButton ID="rb0email" runat="server" GroupName="g0" Text="digitaal" TextAlign="Right" onclick="toggleDiv('0', '');" /> <br /> <div id="div0"> <telerik:RadAsyncUpload OnClientFilesSelected="filesSelected" MaxFileSize="102400000" ID="RadAsyncUpload0" runat="server" Skin="Office2007" TargetFolder="~/Uploads" AllowedFileExtensions=".doc,.xls,.ppt,.pdf,.jpg,.gif,.bmp,.tif,.tiff,.png,.sif,.zip,.swf,.docx,.xlsx,.pptx,.avi,.mpg,.mpeg,.mp3,.wav,.odt,.ods" Culture="Dutch (Netherlands)" MultipleFileSelection="Automatic" OnClientValidationFailed="validationFailed"> <Localization Cancel="Annuleren" Remove="Verwijderen" Select="Selecteren" /> </telerik:RadAsyncUpload><div id="ErrorHolder"></div> Reeds geüpload: </div>If I place an upload not in a div with display none it does work:
<telerik:RadAsyncUpload OnClientFilesSelected="filesSelected" MaxFileSize="102400000" ID="RadAsyncUpload1" runat="server" Skin="Office2007" TargetFolder="~/Uploads" AllowedFileExtensions=".doc,.xls,.ppt,.pdf,.jpg,.gif,.bmp,.tif,.tiff,.png,.sif,.zip,.swf,.docx,.xlsx,.pptx,.avi,.mpg,.mpeg,.mp3,.wav,.odt,.ods" Culture="Dutch (Netherlands)" MultipleFileSelection="Automatic" OnClientValidationFailed="validationFailed"> <Localization Cancel="Annuleren" Remove="Verwijderen" Select="Selecteren" /> </telerik:RadAsyncUpload><div id="ErrorHolder">Any suggestions?