radUpload doesn't work in IE

Thread is closed for posting
2 posts, 0 answers
  1. Ali
    Ali avatar
    15 posts
    Member since:
    Jul 2012

    Posted 20 Sep 2012 Link to this post

    I'm using radUpload control to build a page like gmail file upload, I open a display:none radUpload control using following code:

    <telerik:RadUpload ID="RadUpload1" Runat="server"   OnClientAdded="onClientAdded" ControlObjectsVisibility="None" Localization-Select="abcd"></telerik:RadUpload><br><br><script type="text/javascript"><br>    var $fileInput;<br>    function onClientAdded(sender, args) {<br>        $fileInput = $telerik.$(args._fileInputField);<br>    }<br>    function OpenDialog() {<br>        $fileInput.click();<br>        uploadTimer();<br>    }<br> <br>    </script>



    this is my UploadTimer function:

               function uploadTimer() {<br>               try {<br>                   var t = setTimeout("uploadTimer()", 500);<br>                   //var v = $("#RadUpload1").val();<br><br>                   var upload = $find("<%= RadUpload1.ClientID %>");<br>                   value = upload.getFileInputs()[0].value;<br><br>                   //IE?<br>                   if (navigator.userAgent.indexOf("MSIE") != -1) {<br>                       //if (value != '') {<br>                           $("#btnSubmit").click();<br>                       //}<br>                   }<br>                   else//non IE?<br>                   {<br>                       if (value != '') {<br>                           $("#btnSubmit").click();<br>                       }<br>                   }<br>               }<br>               catch (err) {<br><br>               }<br>           }<br><br>

    I click on this button to display my radUpload, then a timer is called which calls a button server side click function save radUpload selected file to the server, but I have no file uploaded in IE, what is going wrong?

    <input type="button" value="select file" style="font-family:Tahoma;" onclick="OpenDialog()" />

  2. Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 21 Sep 2012 Link to this post

    Hello,

    You can use RadAsyncUpload which implements a behavior similar to the one in Gmail.

    Hope this will be helpful.
     

    Kind regards,
    Plamen
    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. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top