This is a migrated thread and some comments may be shown as answers.

Window refresh method with post data

1 Answer 200 Views
Window
This is a migrated thread and some comments may be shown as answers.
Nicholas Walker
Top achievements
Rank 1
Nicholas Walker asked on 18 Mar 2013, 04:41 PM
                    var win = $("#script-window").kendoWindow({
                        height: "600",
                        title: "Script",
                        visible: true,
                        width: "90%",
                        iframe: true
                    }).data("kendoWindow");

                    win.refresh({
                        url: "http://localhost:57746/InboundScripts",
                        data: { name: "name" }
                    });

I am doing the above but the query string / post data name, does not get sent.  I tried also setting type: "GET" and type: "POST" but got same result either way. 

Can you help?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 20 Mar 2013, 10:02 AM
Hello Nicholas,

In order to post data to a page that will be loaded in an iframe, one has to create a form and post it with a target being the iframe. The iframe should have a name set at the time it is rendered. Unfortunately the Window does not support this out-of-the-box, as its iframe does not have a name attribute.

Currently data via the Window's refresh method is sent only when loading a partial view without an iframe.

In your case I suggest you to include the data as GET parameters in the Window's iframe url.

Greetings,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Window
Asked by
Nicholas Walker
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or