refresh

Refreshes the content of a Window from a remote URL or from the initially defined content template.

Passing data and non-GET requests cannot be sent to an iframe as they require a form with a target attribute.

Parameters

options Object|String

Options for requesting data from the server. If omitted, the Window uses the content property that was supplied when the Window was created. Any specified options will be passed to jQuery.ajax().

options.url String

The server URL that will be requested.

options.cache Boolean

Indicates whether the Ajax request may use a previously cached response. By default, Ajax request caching is not used.

options.data Object

A JSON object which contains the data that will be passed to the server.

options.type String

The HTTP request method (GET, POST).

options.template String

A template that will be used for displaying the requested data.

options.iframe Boolean

Indicates whether the content will be fetched within an iframe or with AJAX, and rendered on the same page.

Returns

kendo.ui.Window - Returns the Window object to support chaining.

Example

<div id="dialog"></div>
<script>
$("#dialog").kendoWindow();
var dialog = $("#dialog").data("kendoWindow");
dialog.refresh("/feedbackForm");

dialog.refresh({
    url: "/feedbackForm",
    data: { userId: 42 }
});

dialog.refresh({
    url: "/userInfo", // returns JSON, { firstName: "Alyx", lastName: "Vance" }
    data: { userId: 42 },
    dataType: "json",
    template: "Hello, #= firstName # #= lastName #"
});
</script>
In this article
Not finding the help you need? Improve this article