Text in File path and Button Click event

Thread is closed for posting
4 posts, 0 answers
  1. NetDeveloper
    NetDeveloper avatar
    7 posts
    Member since:
    Apr 2010

    Posted 13 May 2010 Link to this post

    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? 
  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 18 May 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. NetDeveloper
    NetDeveloper avatar
    7 posts
    Member since:
    Apr 2010

    Posted 24 May 2010 Link to this post

    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?
  5. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 27 May 2010 Link to this post

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