Re: Pre-Upload Event

  •  06-01-2011, 12:34 AM

    Re: Pre-Upload Event

    Hi linkebte,
     
    Please try the example below
     
    <%@ Page Language="C#" %>

    <!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 runat="server">
        <title>example</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <table>
                <tr>
                    <td>
                     Email:
                    </td>
                    <td>
                     
                        <input id="text1" />
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <CuteWebUI:Uploader ID="Uploader1" runat="server" >
                        </CuteWebUI:Uploader>
                    </td>
                </tr>
            </table>
        </form>
    </body>
    </html>

    <script type="text/javascript">
    var uploader1=document.getElementById('<%=Uploader1.ClientID%>')
    var text1=document.getElementById("text1");
    uploader1.handlebrowse=function()
    {
      if (text1.value.indexOf("@") == -1) {
                alert("Please input your email!");
                return false;
     }
    }
    </script>
     
    Regards,
     
    ken
View Complete Thread