This is a migrated thread and some comments may be shown as answers.

Opening JQuery dialog causes kendoWindow iframe to refresh

2 Answers 417 Views
Window
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 13 Oct 2016, 08:53 PM

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 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 14 Oct 2016, 03:27 PM

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.
 
0
Scott
Top achievements
Rank 1
answered on 14 Oct 2016, 03:34 PM

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

 

Tags
Window
Asked by
Scott
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Scott
Top achievements
Rank 1
Share this question
or