I have the following code.
$('a[data-class=ModalLink]').click(openmodal);
function openmodal(event) {
event.preventDefault();
var contentUrl = $(this).attr("data-content");
if (!contentUrl) {
contentUrl = $(this).attr("href");
}
if (contentUrl) {
var dialog = $("#modalwindow");
dialog.kendoWindow({
modal: true,
title: $(this).attr("data-title"),
actions: ["Close"],
draggable: $(this).attr("data-draggable"),
resizable: $(this).attr("data-resizable"),
height: $(this).attr("data-height"),
width: $(this).attr("data-width"),
content: contentUrl
});
dialog.data("kendoWindow").center();
dialog.data("kendoWindow").open();
}
else {
alert("The URL to populate the modal window is missing.");
}
I want the window configuration value like width, height etc. to change every time I open the window. It is not happening. I can see in the debugger that new values are there window is not updating the values except content. How can do this?
$(
'span[data-class=ModalLink]').click(openmodal);
$('a[data-class=ModalLink]').click(openmodal);
$('a[data-class=ModalLink]').click(openmodal);
function openmodal(event) {
event.preventDefault();
var contentUrl = $(this).attr("data-content");
if (!contentUrl) {
contentUrl = $(this).attr("href");
}
if (contentUrl) {
var dialog = $("#modalwindow");
dialog.kendoWindow({
modal: true,
title: $(this).attr("data-title"),
actions: ["Close"],
draggable: $(this).attr("data-draggable"),
resizable: $(this).attr("data-resizable"),
height: $(this).attr("data-height"),
width: $(this).attr("data-width"),
content: contentUrl
});
dialog.data("kendoWindow").center();
dialog.data("kendoWindow").open();
}
else {
alert("The URL to populate the modal window is missing.");
}
I want the window configuration value like width, height etc. to change every time I open the window. It is not happening. I can see in the debugger that new values are there window is not updating the values except content. How can do this?