content Object|String

Specifies a URL or request options from where the Window will load its content.

For URLs which start with a protocol (for example, http://), a container iframe element is automatically created. As this behavior may change in future versions, try to always use the iframe configuration option.

Example - fetching content from the server

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

content.template String

The template for the content of a Window. Returned data from the server will be given as the data of this template.

If the returned data is JSON, the dataType parameter has to 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 in the content area of the Window as is.

Example - fetching JSON and displaying 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>
In this article
Not finding the help you need? Improve this article