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

<button onclick="refreshContent()">Refresh</button>
<div id="dialog"></div>

<script>
  $("#dialog").kendoWindow();
  var dialog = $("#dialog").data("kendoWindow");

  dialog.refresh({
    url: "https://demos.telerik.com/kendo-ui/content/web/tabstrip/ajax/ajaxContent1.html"       
  });

  function refreshContent(){
    dialog.refresh({
      url: "https://demos.telerik.com/kendo-ui/content/web/tabstrip/ajax/ajaxContent2.html",    
    }).open();
  }
</script>
In this article