Opening JQuery dialog causes kendoWindow iframe to refresh

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

    Posted 13 Oct 2016 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 id="dialogPatrol" style="display:none;">
         <iframe id="formviewPatrol" frameborder="0" scrolling="yes" width="685" height="547"></iframe>
    // kendoWindow
     $("#formviewSearchResults").attr('src', "dashboardSearchGrid.html");
    var searchResultsWindow = $("#dialogSearchResults");
         width: "815px",
         height: "500px",
         title: "Search Results",
         actions: [ "Minimize", "Close" ],
    // JQuery 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");


    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?



  2. Marin Bratanov
    Marin Bratanov avatar
    5440 posts

    Posted 14 Oct 2016 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: 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



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

    Posted 14 Oct 2016 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.




Back to Top