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

Text in File path and Button Click event

3 Answers 58 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
NetDeveloper
Top achievements
Rank 1
NetDeveloper asked on 13 May 2010, 03:13 PM
I am having a problem which occurs when a user enters text (not valid file path) into the file path text box.  If the user enters plain text (example: test), and then tries to click the 'Close' button on the page - the Close button click event is never fired. 

This also happens on other pages in the project with all the Upload controls.  It seems that anytime a user enters non-file path text into the file path text box, all other buttons on the page are rendered useless until the 'Clear' button for the upload control is called.  We are trying to avoid forcing the user to use the 'Browse' button solely because of keyboard navigation requirements. 

The following is the code used for the Upload control and the button. 

<

 

telerik:RadUpload ID="rulUpload" runat="server" ControlObjectsVisibility="ClearButtons"

 

 

InputSize="50" MaxFileInputsCount="1" ReadOnlyFileInputs="False" Height="25px"

 

 

Width="498px" Localization-Select="Browse" select="Browse" AllowedFileExtensions=".pdf"

 

 

AllowedMimeTypes="application/pdf" MaxFileSize="5242880" EnableFileInputSkinning="False"

 

 

EnableEmbeddedSkins="True">

 

 

</telerik:RadUpload>

 


<

 

asp:Button ID="btnUpload" runat="server" Text="Upload" CausesValidation="true" ValidationGroup="Save"

 

 

OnClientClick="return btnSaveChecks();" />

 

 

&nbsp;<asp:Button ID="btnClose" runat="server" Text="Close" />

 



Has anyone else encountered this problem and is there a way to fix it? 

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 18 May 2010, 02:43 PM
Hello CRodabaugh,

The typing into the upload's textbox is supported only by IE6 and IE7. IE8 no longer supports this feature. If you place ASP.NET FileUpload or regular <input type='file' /> you will notice that it is not possible to enter any text into the input field. However, there seems to be a bug with RadUpload (with disabled skinning) that allows one to enter text. This unfortunately leads to the halt mentioned. We will look into the issue, however I think that this is some kind of bug in IE.

Best wishes,
Genady Sergeev
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
NetDeveloper
Top achievements
Rank 1
answered on 24 May 2010, 10:53 PM
I enabled the property ReadOnlyFileInputs="True" for my RADUpload controls, but now we have a new problem.  With that property enabled - our users are not able to tab through the Upload Controls using keyboard navigation.  We are required to meet strict 508 requirements, and with that property enabled, the tab gets stuck in the textbox. 

Is there any way to disable the textbox from being editable while preserving the keyboard navigation?
0
Genady Sergeev
Telerik team
answered on 27 May 2010, 01:17 PM
Hi CRodabaugh,

You can achieve this with the following JavaScript code:

<script type="text/javascript">
        Sys.Application.add_load(function(e) {
            var $ = $telerik.$;
            var upload = $find("RadUpload1");
 
            $(".ruFakeInput", upload.get_element())
                .live("keydown", function(e) {
                    if (e.which != 9) {
                        e.preventDefault();
                    }
                });
        });
     
    </script>
    <div>
        <telerik:RadUpload runat="server" ID="RadUpload1" TabIndex="1"></telerik:RadUpload>
    </div>


Kind regards,
Genady Sergeev
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.
Tags
Upload (Obsolete)
Asked by
NetDeveloper
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
NetDeveloper
Top achievements
Rank 1
Share this question
or