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

radUpload doesn't work in IE

1 Answer 40 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Ali
Top achievements
Rank 1
Ali asked on 20 Sep 2012, 01:18 PM
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()" />

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 21 Sep 2012, 02:06 PM
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.
Tags
Upload (Obsolete)
Asked by
Ali
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or