UploadAttachments and jQuery Dialog

Last post 12-14-2012, 1:19 PM by xmas79. 1 replies.
Sort Posts: Previous Next
  •  12-14-2012, 12:07 PM 75463

    UploadAttachments and jQuery Dialog

    Hi,

    I have a problem using UploadAttachments item inside a jQuery dialog. It simply doesn't show up. Here a sample code that reprocudes the problem:

     

    1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    2.  
    3. <html xmlns="http://www.w3.org/1999/xhtml"> 
    4. <head runat="server"> 
    5.     <title></title> 
    6.     <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" /> 
    7.     <script src="http://code.jquery.com/jquery-1.8.3.js" type="text/javascript"></script> 
    8.     <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js" type="text/javascript"></script> 
    9. </head> 
    10. <body> 
    11.     <form id="form1" runat="server"> 
    12.         <a href="#" id="open">Open dialog</a> 
    13.         <div id="dialog" title="dialog"> 
    14.             <ce:UploadAttachments ID="fu" runat="server"></ce:UploadAttachments> 
    15.             <ce:Editor runat="server"></ce:Editor> 
    16.         </div>     
    17.         <script type="text/javascript"> 
    18.             $(document).ready(function () { 
    19.                 $("#dialog").dialog({ 
    20.                     autoOpen: true, 
    21.                     modal: true, 
    22.                     draggable: false, 
    23.                     resizable: false 
    24.                 }); 
    25.                 $("#open").click(function () { 
    26.                     $("#dialog").dialog("open"); 
    27.                 }); 
    28.             }); 
    29.         </script> 
    30.     </form> 
    31. </body> 
    32. </html> 

    Editor, instead, works as expected.

     

    Using just downloaded version of cuteeditor.dll

     

    Best regards,

    Xmas79.

  •  12-14-2012, 1:19 PM 75464 in reply to 75463

    Re: UploadAttachments and jQuery Dialog

    Added this line in the script tag and it works:  $("#dialog").parent().appendTo($("form:first"));

     
     
    The code is now:
     

     
    1.         <script type="text/javascript"> 
    2.             $(document).ready(function () {
    3.                 $("#dialog").dialog({
    4.                     autoOpen: true,
    5.                     modal: true,
    6.                     draggable: false,
    7.                     resizable: false
    8.                 });
    9.                 $("#open").click(function () {
    10.                     $("#dialog").dialog("open");
    11.                 });
    12.               $("#dialog").parent().appendTo($("form:first"));
    13.             });
    14.         </script> 

    Thank you,

    Xmas79.

     

    P.S.

    At the right bottom of this editor here in the forum I have a wrong translation on chars count. Let me know who I can contact to correct this translation.

View as RSS news feed in XML