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

POST Method Support?

9 Answers 938 Views
Window
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 04 Nov 2011, 11:49 PM
Does Kendo Supports POST type? (I'm using beta 2)

If so how can i enable? here's my code:

                $("#undo").click(function(){
                    $("#window").kendoWindow({
                        title: "User saved",
                        contentUrl: '../data/insertUser.php',
                        type: "POST",
                        data: {name: 'name'},
                        close: onClose
                    });
                 });

9 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 09 Nov 2011, 02:55 PM
Hi Luis,

Thank you for drawing our attention to this. We changed the window API to allow setting of all request options -- please refer to the changes and backwards compatibility help topic to migrate your code to the attached kendo.window.js. After that, you can use the refresh method like so:

    windowObject.refresh({
        url: "../data/insertUser.php",
        type: "POST",
        data: { name: "name" }
    });


All the best,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Alex Gyoshev
Telerik team
answered on 09 Nov 2011, 03:12 PM
I realized I sent the wrong file. Please use the one attached to this post.

All the best,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Luis
Top achievements
Rank 1
answered on 09 Nov 2011, 06:52 PM
This file seems to make a conflict with one or some of the other dependencies, can you send me the kendo.all.min.js file instead?
0
Accepted
Alex Gyoshev
Telerik team
answered on 10 Nov 2011, 03:05 PM
Attached is the whole build.

Greetings,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Luis
Top achievements
Rank 1
answered on 10 Nov 2011, 05:10 PM
Thanks a lot,
if anyone had this trouble the kendo window creation shall be:
var window = $("#window");
  
window.kendoWindow({
content:{
url: "url.php",
type="POST",
data: {name: "name"}
}
});
0
Phil
Top achievements
Rank 1
answered on 22 Aug 2012, 02:53 PM
What am I missing on this?  I can't seem to get a POST to work.  Here's a jsFiddle with what I'm trying:

http://jsfiddle.net/pvanhouten/Cxuqb/

You'll need to use Fiddler or something like that to see that it's trying to GET rather than POST in the request.  Ignore the fact that it returns a 404 in the iframe, just a limitation with my test scenario on jsFiddle.

Thanks for the help!

Phil
0
Jim
Top achievements
Rank 1
answered on 14 Sep 2012, 07:28 PM
Hi Phil - I have the same problem. I believe this is related to the iframe=true you specified.  If you turn that off it will post.  For me if I have iframe=true then I only do a GET on the content.  I was just coming to the forums to ask for help on this and noticed your post.  The unfortunate side affect for GET vs POST is that IE does some bad caching things with GET requests.  There are known work arounds ( like adding a random parameter to the get parameters ) but this feels like something telerik might have some help for.
0
Jeff
Top achievements
Rank 1
answered on 26 Mar 2015, 02:45 PM
how did you get yours to work. I am trying to do this as a refresh and an open. What am i doing wrong?

function openDetailWindow() {
            var grid = $("#AjaxGrid").data("kendoGrid");
            var selectedData = grid.dataItem(grid.select());
            var stringData = JSON.stringify(selectedData);

            var window = $("#UserDetailDiv").data("kendoWindow");
            var PopUpTitle = "User Detail: ";
            
            window.setOptions({
                title: PopUpTitle,
                content: "Loading....."
            });

           @* window.refresh({
                url: "@Url.Content("~/Inquiry/UserDetail?userData=")" + stringData + "&directCall=T"
         
            url: "~/Inquiry/UserDetail",
            type: "POST",
            data: { userData: stringData, directCall: "T" }



            });*@

            window.kendoWindow({
                content:{
                    url: "../Inquiry/UserDetail",
                    type: "POST",
                    data: { userData: stringData, directCall: "T" }
                }
            });
            

            window.open();
            window.center();

            
        }
0
Jeff
Top achievements
Rank 1
answered on 26 Mar 2015, 02:46 PM
will this work for MVC calling into a controller action as well? 
Tags
Window
Asked by
Luis
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Luis
Top achievements
Rank 1
Phil
Top achievements
Rank 1
Jim
Top achievements
Rank 1
Jeff
Top achievements
Rank 1
Share this question
or