Window MVVM with content set how to disable iframe

4 posts, 0 answers
  1. Joseph
    Joseph avatar
    3 posts
    Member since:
    Feb 2014

    Posted 07 Dec 2015 Link to this post

    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.

  2. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    353 posts

    Posted 08 Dec 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Joseph
    Joseph avatar
    3 posts
    Member since:
    Feb 2014

    Posted 08 Dec 2015 Link to this post

    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.

  5. Joseph
    Joseph avatar
    3 posts
    Member since:
    Feb 2014

    Posted 08 Dec 2015 in reply to Joseph Link to this post

    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!!!!

Back to Top
Kendo UI is VS 2017 Ready