Opening JQuery dialog causes kendoWindow iframe to refresh

3 posts, 0 answers
  1. Scott
    Scott avatar
    19 posts
    Member since:
    Mar 2011

    Posted 13 Oct Link to this post

    I'm using a kendoWindow in an application that also contains several JQuery dialogs.  Both the kendoWindow and JQuery dialogs use iframes,similar to the following:

    <div id="dialogSearchResults"  style="display:none;" >
        <iframe id="formviewSearchResults" frameborder="0" scrolling="yes" width="100%" height="100%"></iframe>
    </div>
     <div id="dialogPatrol" style="display:none;">
         <iframe id="formviewPatrol" frameborder="0" scrolling="yes" width="685" height="547"></iframe>
     </div>
     
    // kendoWindow
     
     $("#formviewSearchResults").attr('src', "dashboardSearchGrid.html");
    var searchResultsWindow = $("#dialogSearchResults");
     searchResultsWindow.kendoWindow({
         width: "815px",
         height: "500px",
         title: "Search Results",
         actions: [ "Minimize", "Close" ],
     });
     searchResultsWindow.data("kendoWindow").open();
     
    // JQuery dialog
     
     $("#dialogPatrol").dialog({
         dialogClass: 'no-close',
         autoOpen: false,
         position: 'center',
         draggable: true,
         width: 685,
         height: 557,
         resizable: false,
         scrolling: true,
         modal: false
     });
     $("#formviewPatrol").attr('src', "patrol.htm");
     $("#dialogPatrol").dialog("open");

     

    When I open the JQuery dialog when the kendoWindow is open, it causes the the iframe inside the kendoWindow to refresh.  This only happens the first time the JQuery dialog is opened.  If I close it, then re-open it, it doesn't cause the behavior.  I've tried different configurations of modal versus non-modal, but nothing works.  Any idea how to stop this behavior?

    Thanks.


     

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 14 Oct Link to this post

    Hi Scott,

    An iframe gets reloaded when it is moved in the DOM. I am not sure what exactly the jQuery dialog does, but it may be moving the iframes around or accessing and reloading them.

    I can suggest two ideas:

    • replace the jQuery UI dialog with a Kendo Widnow
    • try loading the kendoWindow content like this: http://dojo.telerik.com/@bratanov/ijOge. Key points: iframe is not present in the page markup initially, and it is also loaded dynamically only when the dialog shows, not on initial page load

     


    Regards,

    Marin Bratanov
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. Kendo UI is VS 2017 Ready
  4. Scott
    Scott avatar
    19 posts
    Member since:
    Mar 2011

    Posted 14 Oct in reply to Marin Bratanov Link to this post

    Hi Marin,

    Thanks very much for your detailed reply and example. I'll experiment with letting Kendo create the iframe.  If I can't make that work I'll rewrite all the JQuery dialogs using Kendo Windows.  Kendo Window is a superior dialog anyway.

    Thanks,

    Scott

     

Back to Top