Re: Changing Z-Index of Floating Div

  •  08-12-2009, 10:49 AM

    Re: Changing Z-Index of Floating Div

    Hi,
     
    Please check this sample:
    1. <%@ Page Language="C#" Title="First sample" %>  
    2.   
    3. <%@ Import Namespace="CuteWebUI" %>  
    4. <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>  
    5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">  
    6.   
    7. <script runat="server">  
    8.   
    9.     void InsertMsg(string msg)   
    10.     {   
    11.         ListBoxEvents.Items.Insert(0, msg);   
    12.         ListBoxEvents.SelectedIndex = 0;   
    13.     }   
    14.     protected void UploadAttachments1_AttachmentAdded(object sender, AttachmentItemEventArgs args)   
    15.     {   
    16.         InsertMsg("Added.." + args.Item.FileName);   
    17.     }   
    18.   
    19.     protected void UploadAttachments1_FileValidating(object sender, UploaderEventArgs args)   
    20.     {   
    21.   
    22.     }   
    23. </script>  
    24.   
    25. <html xmlns="http://www.w3.org/1999/xhtml">  
    26. <head id="Head1" runat="server">  
    27. </head>  
    28. <body>  
    29.     <form id="Form1" runat="server">  
    30.         <div style="position: absolute; z-index: 400; background-color: Black; width: 400px;   
    31.             height: 400px;">  
    32.         </div>  
    33.         Hello   
    34.         <br />  
    35.         <CuteWebUI:UploadAttachments runat="server" ID="UploadAttachments1" OnAttachmentAdded="UploadAttachments1_AttachmentAdded"  
    36.             OnFileValidating="UploadAttachments1_FileValidating">  
    37.         </CuteWebUI:UploadAttachments>  
    38.         <br />  
    39.         <div>  
    40.             Server Trace:   
    41.             <br />  
    42.             <asp:ListBox runat="server" ID="ListBoxEvents" Width="800"></asp:ListBox>  
    43.         </div>  
    44.     </form>  
    45.   
    46.     <script type="text/javascript">  
    47.     function CuteWebUI_AjaxUploader_OnMantleButton(btn,div)   
    48.     {   
    49.         div.style.backgroundColor="red";   
    50.         div.style.filter="";   
    51.         div.style.zIndex=300;   
    52.     }   
    53.     </script>  
    54.   
    55. </body>  
    56. </html>  

    Regards,
    Terry
View Complete Thread