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

Window MVVM with content set how to disable iframe

3 Answers 177 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Joseph
Top achievements
Rank 1
Joseph asked on 07 Dec 2015, 03:55 PM

I wanted to initialize a window with mvvm but the problem is that it defaults to loading the content into a iframe.

I tried disabling the iframe with data-iframe="false" but it seems to ignore this.

Here is a snipet of the mvvm html

 <div data-role="window"

        data-title="Loading..."

        data-actions="['Close']"

        data-draggable="true"

        data-resizable="false"

        data-iframe="false"

         data-content="fmwEquipmentInformation.html"

        id="fmwEquipmentInformation">

</div>

 

In javascript I attempt to intialize with...

kendo.init(jQuery("#fmwEquipmentInformation"));

This loads the window but loads the content into a iframe which causes problems trying to bind the content div to data afterwards.

3 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 08 Dec 2015, 12:30 PM
Hi Joseph,

Normally, the Kendo UI Window will create an iframe only if the iframe property is set to true, or if the content URL contains a protocol, which does not seem to be the case.

http://docs.telerik.com/kendo-ui/web/window/overview#using-iframes

Please check the following example, which demonstrates a Kendo UI Window with Ajax-loaded content and no iframe. Please compare it with your implementation and let me know if you need further assistance.

http://dojo.telerik.com/UKeME

Regards,
Dimiter Topalov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Joseph
Top achievements
Rank 1
answered on 08 Dec 2015, 01:43 PM

Hi Dimiter,

 The example I gave did not include the exact content url.

the url does contain a protocol I will attempt strip this off and see if this helps thanks.

0
Joseph
Top achievements
Rank 1
answered on 08 Dec 2015, 02:14 PM

All,

 Removing the url portion from the address fixed the problem for me.

I used the following replace statement with regex.

url.replace(/^.*\/\/[^\/]+/, '')

This removes everything in the protocol and host section of the url.

This worked great!!!!

Tags
MVVM
Asked by
Joseph
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Joseph
Top achievements
Rank 1
Share this question
or