4 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 20 Nov 2013, 07:26 AM
0

Freddy
Top achievements
Rank 1
answered on 26 Nov 2013, 04:18 PM
Hi telerik admins,
Please give me a solution if this is possible. Have been waiting for an answer since a week? :-(
I want to display a browser confirm if the user press cancel button when client uploading happens. If OK button is clicked upload should continue, and on Cancel click, cancel the upload.
Please give me a solution if this is possible. Have been waiting for an answer since a week? :-(
I want to display a browser confirm if the user press cancel button when client uploading happens. If OK button is clicked upload should continue, and on Cancel click, cancel the upload.
0
Accepted
Hi Freddy,
Yes it is possible. Please try to add the following javascript:
Regards,
Hristo Valyavicharski
Telerik
Yes it is possible. Please try to add the following javascript:
<script type=
"text/javascript"
>
Telerik.Web.UI.RadAsyncUpload.prototype._cancelUpload =
function
(row) {
if
(confirm(
'Do you want to cancel file uploading.'
)) {
this
._updateRowImage(row,
"cancel"
);
this
._updateCancelButton(row);
$(
".ruFileProgressWrap"
, row).remove();
this
._uploadModule.cancel(row);
}
}
</script>
Regards,
Hristo Valyavicharski
Telerik
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 the blog feed now.
0

Massimiliano
Top achievements
Rank 1
answered on 31 Dec 2013, 05:27 PM
I need something simplier. I just need to intercept the cancel client-side and if it's possible to get a reference to the RadAsyncUpload sender control of that cancel. Is this possible?
What I need is something similar to:
Is ok but how could I access the sender (i cannot resort to <% %> since I would like to put this in an external JS)
Thanks
EDIT SOLVED:
I solved that way just in case anyone needs something similar:
What I need is something similar to:
Telerik.Web.UI.RadAsyncUpload.prototype._cancelUpload =
function
() {
$(
'#'
+ sender.get_id().replace(
'RadAsyncUpload1'
,
'AvatarLabel'
)).show();
$(
".AvatarUpload .ruInputs"
).hide();
$(
".AvatarImageAjaxLoading"
).show();
}
Is ok but how could I access the sender (i cannot resort to <% %> since I would like to put this in an external JS)
Thanks
EDIT SOLVED:
I solved that way just in case anyone needs something similar:
Telerik.Web.UI.RadAsyncUpload.prototype._cancelUpload =
function
(row) {
$(
'#'
+
this
.get_id().replace(
'RadAsyncUpload1'
,
'AvatarLabel'
)).show();
$(
".AvatarUpload .ruInputs"
).hide();
$(
".AvatarImageAjaxLoading"
).show();
}