# Post to the Iframe Content of the Window

## Environment

<table>
 <tr>
  <td>Product</td>
  <td>Progress® Kendo UI® Window for jQuery</td>
 </tr>
 <tr>
  <td>Operating System</td>
  <td>Windows 10 64bit</td>
 </tr>
 <tr>
  <td>Visual Studio Version</td>
  <td>Visual Studio 2017</td>
 </tr>
 <tr>
  <td>Preferred Language</td>
  <td>JavaScript</td>
 </tr>
</table>

## Description

How can I post to the iframe content of the Kendo UI Window?

## Solution

The example below demonstrates how to achieve the desired scenario.

```dojo
    <button id="refresh">Post content to iframe</button>
    <script>
      $("#refresh").kendoButton({
        themeColor:"primary",
        click:function(e) {
          e.preventDefault();
          var id = "target_iframe";
          var dialog = $("<div><iframe class='k-content-frame' name='" + id + "'></div>").kendoWindow({
            width: "615px",
            title: "Posting to iframe example",
            close: function() { this.destroy() },
            iframe: true
          });
          dialog.data("kendoWindow").center().open();
          $("<form />", {
            action: "http://www.example.com/",
            method: "post",
            target: id
          })
            .hide().appendTo("body")
          // add any data
            .append("<input name='foo' />").find("[name=foo]").val("bar").end()
            .submit().remove();
        }
      })
    </script>
```

## See Also

* [Window JavaScript API Reference](https://www.telerik.com/kendo-jquery-ui/documentation/api/ui/window)
* [Add Auto-Resizing Splitter](https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/add-auto-resizing-splitter)
* [Create Confirmation Dialog via Promises](https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/confirmation-dialog-promise)
* [Display Loading Indicator over Window](https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/display-loading-overlay)
* [Initialize the Grid](https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/initiliaze-grid-in-window)
* [Restrict Window Positioning](https://www.telerik.com/kendo-jquery-ui/documentation/knowledge-base/restrict-windows-position)
