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>
  content: "/details"

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:

        { username: " username here..." }


  content: {
    url: "/userDetails",
    dataType: "json",
    iframe: false,
    template: "User name: #= data.username #"
In this article
Not finding the help you need? Improve this article