Unable to get textbox in client side.

6 posts, 1 answers
  1. Jane
    Jane avatar
    13 posts
    Member since:
    Aug 2013

    Posted 13 Aug 2013 Link to this post

    Hi Telerik,

    I want to access the textbox of asyncupload in javascript. I was trying with the onclientfileselected event handler and there I got the getFileinputField() function but on debugging I am getting a null value. Here is the code I wrote.

    <script type="text/javascript">
    function fileselectedhandler(sender, eventArgs)
    {
         var inputfield=eventArgs.getInputField();
    }
    </script>

    I am not getting any JS error.

    Thanks and Regards,
    Jane
  2. A2H
    A2H avatar
    177 posts
    Member since:
    Mar 2010

    Posted 13 Aug 2013 Link to this post

    Hi Jane,

    Please try the below implementation to access the textbox.
    function fileselectedhandler(sender, eventArgs) {
                var inputfield = eventArgs.get_fileInputField();
                alert(inputfield.value);  
            }


    Thanks,
    A2H
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Aug 2013 Link to this post

    Hi Jane,

    This is a known issue and to fix this you have to set DisablePlugins property of RadAsyncUpload to true and add the following style.

    CSS:

    #thumbnail img
    {
        filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);
    }

    Thanks,
    Shinu.
  5. Jane
    Jane avatar
    13 posts
    Member since:
    Aug 2013

    Posted 15 Aug 2013 Link to this post

    Got it working shinu thanks
  6. Jane
    Jane avatar
    13 posts
    Member since:
    Aug 2013

    Posted 20 Aug 2013 Link to this post

    Hi shinu

    I am hiding the select button. Instead I want to display Click here to select files text inside the textbox. Please help.
  7. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 Aug 2013 Link to this post

    Hi Jane,

    Please try the following JavaScript.

    JavaScript:
    <script type="text/javascript">
        function pageLoad() {
            var $ = $telerik.$;
            $('.ruFakeInput.radPreventDecorate').val("Click here to select files");
        }
    </script>

    Thanks,
    Shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017