Select file while click

3 posts, 0 answers
  1. Sakthi
    Sakthi avatar
    1 posts
    Member since:
    Nov 2011

    Posted 12 Nov 2011 Link to this post

    Thanks in advance....

    while i click rad button... i want open Asynradupload file select window or open a select window from  jquery instead click asynradupload button...
  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1600 posts

    Posted 15 Nov 2011 Link to this post

    Hi Sakthi,

    This is not possible due to a security limitations in the browsers. One have to explicitly click on the file input in order to open the dialog, it is not possible to use JavaScript.

    Kind regards,
    Genady Sergeev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 31 May 2012 Link to this post

    Hello Sakthi,

    The functionality that you need to achieve is now available in most of the browsers except for the IE. You can use the following code (find the input by its css class) to trigger the click event:
    <script type="text/javascript">
               function OnClientClicking(sender) {
                   sender.set_autoPostBack(false);
                   $telerik.$(".ruFileInput").click();
               }                          
           </script>

    markup:
    <telerik:RadButton runat="server" Text="SELECT" ID="button1" OnClientClicking="OnClientClicking">
            </telerik:RadButton>
            
            <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" Localization-Select="" MaxFileInputsCount="1">
            </telerik:RadAsyncUpload>

    Greetings,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top