Edit this page

Post to Iframe

The example below demonstrates how to post to the iframe content of the Kendo UI Window.

Example
    <button id="refresh" class="k-button k-primary">Post content to iframe</button>

    <script>
      $("#refresh").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

Other articles and how-to examples on the Kendo UI Window:

For more runnable examples on the Kendo UI Window, browse the How To documentation folder.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy