Re: Hover/Action CSS for AjaxUploader InsertButton

  •  11-02-2012, 8:06 AM

    Re: Hover/Action CSS for AjaxUploader InsertButton

    Hi AGregory,

     

    The uploader control has 4 upload modes, html5,silverlight,flash,iframe. The hover css style setting only work under html5 and iframe mode. 

     

    Please try the example below, if load as html5 or iframe mode, the button will apply the  .UploadButton:hover style setting. If load as silverlight or flash mode, then it will apply the setting in API "CuteWebUI_AjaxUploader_OnMantleButton"

     

    1. <%@ Page Language="C#" Title="Customize the queue UI" %>  
    2.   
    3. <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">  
    5. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head id="Head1" runat="server">  
    7.     <style>  
    8.         .UploadButton:hover  
    9.         {  
    10.             color: Red;  
    11.         }  
    12.     </style>  
    13. </head>  
    14. <body>  
    15.     <form id="Form1" runat="server">  
    16.     <div>  
    17.         <CuteWebUI:UploadAttachments runat="server" ID="uploader1" InsertButtonID="myUpload">  
    18.         </CuteWebUI:UploadAttachments>  
    19.         <input type="button" id="myUpload" value="upload a file" class="UploadButton" />  
    20.     </div>  
    21.     </form>  
    22. </body>  
    23. </html>  
    24. <script type="text/javascript">  
    25.     function CuteWebUI_AjaxUploader_OnMantleButton(btn, div) {  
    26.         // for flash and silverlight mode here  
    27.         div.onmouseover = function () {  
    28.             btn.style.color = "blue";  
    29.         }  
    30.     }  
    31.   
    32. </script>  
     

    Regards,

     

    Ken 

View Complete Thread