Hi mtaute,
Please try the example below, it shows you how to catch the cancel event
- <%@ Page Language="C#" %>
-
- <%@ Register TagPrefix="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" Namespace="CuteWebUI" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
- <title>example</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <CuteWebUI:Uploader runat="server" ID="Uploader1" CancelButtonID="ButtonCancel">
- </CuteWebUI:Uploader>
- <asp:Button ID="ButtonCancel" runat="server" Text="Cancel.." />
- </div>
- </form>
-
- <script>
-
- var btn1=document.getElementById('<%=ButtonCancel.ClientID %>');
- var int1;
- function MyClickHandler(event)
- {
- btn1.canclefunction();
-
- alert("cancelled..")
-
-
- event=window.event||event;
- if(event.preventDefault)event.preventDefault();
- return event.returnValue=false;
- }
- function CheckUploaderScriptStatus()
- {
-
-
- if(btn1.onclick)
- {
-
- clearInterval(int1);
-
- btn1.canclefunction=btn1.onclick;
-
- btn1.onclick=MyClickHandler;
- }
- }
- int1=setInterval(CheckUploaderScriptStatus,10);
-
- </script>
-
- </body>
- </html>
Regards,
Ken