Edit this page

content Object |String

Specifies a URL or request options that the window should load its content from.

Note: For URLs starting with a protocol (e.g. http://), a container iframe element is automatically created. This behavior may change in future versions, so it is advisable to always use the iframe configuration option.

Example - fetch content from the server

<div id="dialog"></div>
<script>
$("#dialog").kendoWindow({
  content: "/details"
});
</script>

content.template String

Template for the content of a Window. Returned data from the server will be given as the data of this template. Note that if the returned data is JSON, the dataType parameter should be passed, so that the data gets parsed by jQuery.

If the URL contains a protocol, set iframe to false, otherwise the JSON response will be injected "as is" in the Window content area.

Example - fetch JSON and display it through a template

<div id="dialog">
    <p><strong>This example will not work, unless you define a valid JSON service URL for `content.url`.</p>
    <p>The expected JSON response is:
        <pre>

        { username: "...my username here..." }

        </pre>
    </strong></p>
</div>

<script>
$("#dialog").kendoWindow({
  content: {
    url: "/userDetails",
    dataType: "json",
    iframe: false,
    template: "User name: #= data.username #"
  }
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy