AjaxUploader within jQuery dialog

Last post 07-07-2009, 12:15 AM by cutechat. 3 replies.
Sort Posts: Previous Next
  •  06-29-2009, 11:58 AM 53595

    AjaxUploader within jQuery dialog


    ** Joyce from Live Support sent us here **

    Hi, we bought your AjaxUploader, which is fantastic, and we would like to use it within a jQuery dialog. The problem that we are facing is that there is no event triggered when clicking the browse button (The popup is shown correctly with all its content, but when we click on browse nothing happens). If we move the <CuteWebUI> tag outside of the div used as the dialog, everything is fine, but we want it in the dialog box!
     
    Here is the code :
     
    JavaScript (jQuery)
    1. $(document).ready(function() {   
    2.    bindAttachmentsButton("myContainer");   
    3. });   
    4.   
    5. function bindAttachmentsButton(container) {   
    6.     var popupContainer = $("div[id*='panPopupAttachments']", container.parent());   
    7.   
    8.         $(popupContainer).dialog("open");   
    9.     });   
    10.   
    11.     $(popupContainer).dialog({   
    12.         autoOpen: false,   
    13.         modal: true,   
    14.         closeOnEscape: true,   
    15.         width: 1000,   
    16.         buttons: {   
    17.             "Close"function() {   
    18.                 $(this).dialog("close");   
    19.                 $("select").show();   
    20.             }   
    21.         }   
    22.     });   
    23. }  
     
    ASPX
    1. <div id="panPopupAttachments" style="display : none;">   
    2.     <h2>Attachments for this Update</h2>   
    3.     <CuteWebUI:Uploader runat="server"    
    4.         ID="ajaxUploaderAttachments"  
    5.         InsertText="Browse"
    6.         OnFileUploaded="ajaxUploaderAttachments_FileUploaded"  
    7.         MultipleFilesUpload="true">   
    8.         <ValidateOption MaxSizeKB="2097151" />   
    9.     </CuteWebUI:Uploader>   
    10.     <asp:UpdatePanel runat="server" ID="updatePanelAttachments">   
    11.         <ContentTemplate>     
    12.             <asp:GridView runat="server" ID="gvAttachments" />    
    13.         </ContentTemplate>   
    14.     </asp:UpdatePanel>   
    15. </div>  
    Thank you for your help!
     
    Jeepi
  •  06-29-2009, 9:38 PM 53620 in reply to 53595

    Re: AjaxUploader within jQuery dialog

    Hi,
     
    That is a modal dialog.
     
    We are investigating on it and get back to you asap.
     
    Regards,
    Terry.
  •  07-01-2009, 8:56 PM 53686 in reply to 53620

    Re: AjaxUploader within jQuery dialog

    Thank you, we will keep trying on our side and let you know if we find something.
     
    Are you able to reproduce the problem?
  •  07-07-2009, 12:15 AM 53778 in reply to 53686

    Re: AjaxUploader within jQuery dialog

    Hi,
     
    We have tested the modal dialog.
     
    The uploader works find there.
     
    Please make sure you are using the last version.
     
     
    Another thing , the modal dialog do not support form submit (it will submit to a new window)
     
    Are you using AJAX ? or normal form posting ?
     
     
    I suggest you use another page to host the content of the dialog:
     
     
    dialogpage.apsx:
     
    <iframe style="width:100%;height:100%" src="myuploadpage.aspx"></iframe>
     
    Regards,
    Terry
     
View as RSS news feed in XML