I am using the Kendo window right now and they have an ajax method meant to load in new content to the window. This works on my localhost but for some reasons stops when I publish the site to a remote server. The content is just never loaded in, I have debugged the javascript on the server and the ajax calls are being made. Any help would be appreciated.
This is the code I am using.
@(Html.Kendo().Window()
.Name("window")
.Title("test")
.Actions(Image => Image
.Custom("custom")
.Minimize()
.Maximize()
.Close()
)
//.LoadContentFrom(@Model.selectedModule, "Modules")
.Draggable()
.Resizable()
.Width(500)
.Modal(true)
.Height(500)
.Visible(false)
)
function test(link) {
var use = link.title;
var dialog = $("#window").data("kendoWindow");
dialog.refresh({
url: "/Modules/" + use
});
setTimeout("open()", 200);
};
function open() {
var dialog = $("#window").data("kendoWindow");
dialog.center();
dialog.open();
}
</Script>
In the end I took the suggestion and replaced the method with the URL helper. The codeblock is as follows.
function test(link) {
var use = link.data('url');
var dialog = $("#window").data("kendoWindow");
dialog.refresh({
url: use
});
setTimeout("open()", 200);
To me it sounds like the URL is not resolved when using the deploying envirment. Can you try and use the URL helper which MVC provides? Also you can use network tools of the browser to see what actually the server responded.