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

RadAsyncUpload hides whn trying to use some client-side scripting ?

1 Answer 35 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Barry
Top achievements
Rank 1
Barry asked on 13 Jan 2014, 09:48 PM
Hi,

           <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" Skin="Black" 
                TargetFolder="~/Uploads" TemporaryFolder="~/Uploads/TempFiles" DropZones=".DropZone1" 
                MultipleFileSelection="Automatic" UploadedFilesRendering="BelowFileInput" 
                Width="300px" onclientfileuploaded="setGaugeValue();"></telerik:RadAsyncUpload>

                <script type="text/javascript">
                    function setGaugeValue() {
                        $find("<%=UploadedFileGauge.ClientID %>").set_value($get("<%=UploadedFileGaugeHiddenValue.ClientID %>").value);
                    }
            </script>

...I'm trying to update the gauge value on the client side, each time a file is uploaded (won't work using the RadAsyncUpload1.FileUploaded event handler on the server-side). But...if I put in a call to some client-side JavaScript the gauge hides on my web page.

Please advise,

Bazz

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Jan 2014, 06:04 AM
Hi,

I guess that you are setting a Hidden field value to RadRadialGauge on OnClientFileUploaded event. Please have a look into the following code snippet which works fine at my end.

ASPX:
<telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" Skin="Silk" TargetFolder="~/Uploads"
    MultipleFileSelection="Automatic" UploadedFilesRendering="BelowFileInput" Width="300px"
    OnClientFileUploaded="setGaugeValue">
</telerik:RadAsyncUpload>
<asp:HiddenField ID="UploadedFileGaugeHiddenValue" runat="server" Value="10" />
<br />
<telerik:RadRadialGauge runat="server" ID="UploadedFileGauge" Width="300px" Height="300px">
    <Pointer Value="2.2">
        <Cap Size="0.1" />
    </Pointer>
</telerik:RadRadialGauge>

JavaScript:
<script type="text/javascript">
    function setGaugeValue(sender, args) {
        $find("<%=UploadedFileGauge.ClientID %>").set_value($get("<%=UploadedFileGaugeHiddenValue.ClientID %>").value);
    }
</script>

Thanks,
Shinu.
Tags
AsyncUpload
Asked by
Barry
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or