Re: Uploader in Jquery Dialog

  •  09-15-2010, 2:51 AM

    Re: Uploader in Jquery Dialog

    Hi agerled,
     
    Try put the Jquery dialog code into method "CuteWebUI_AjaxUploader_OnInitialize". Like the example below.
     
    1. <%@ Page Language="vb"%>   
    2.   
    3. <%@ Register Assembly="CuteWebUI.AjaxUploader" Namespace="CuteWebUI" TagPrefix="cc1" %>   
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
    5. <html xmlns="http://www.w3.org/1999/xhtml">   
    6. <head runat="server">   
    7.     <title></title>   
    8.   
    9.     <script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"  
    10.         type="text/javascript"></script>   
    11.   
    12.     <script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"  
    13.         type="text/javascript"></script>   
    14.   
    15.     <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" />   
    16.   
    17.     <script language="javascript" type="text/javascript">   
    18.   
    19.          function CuteWebUI_AjaxUploader_OnInitialize()   
    20.          {   
    21.             $(function() {   
    22.   
    23.                $("#dialog").dialog({   
    24.                    height: 450,   
    25.                    width: 850,   
    26.                    modal: true,   
    27.                   autoOpen: true   
    28.                });   
    29.            });   
    30.                
    31.          }   
    32.           
    33.     </script>   
    34. </head>   
    35. <body>   
    36.     <form id="form1" runat="server">   
    37.        
    38.                
    39.         <div>   
    40.   
    41.             <div id="dialog" title="Dialog">   
    42.                 <div>   
    43.                 </div>   
    44.                 <div style="width: 500px;">   
    45.                     <div id="divAddFiles">   
    46.                         <asp:Button runat="server" ID="btnAddFiles" Text="Select files" />   
    47.                     </div>   
    48.                     <div id="divCancelUpload" style="margin-top: 4px;">   
    49.                         <asp:Button runat="server" ID="btnCancelUpload" Text="Cancel" />   
    50.                     </div>   
    51.                 </div>   
    52.             </div>   
    53.                
    54.             <cc1:Uploader runat=server ID='uploader1' InsertButtonID='btnAddFiles' />   
    55.                
    56.         </div>   
    57.                       
    58.     </form>   
    59. </body>   
    60.       
    61. </html>  
    Regards,
     
    ken
View Complete Thread