I think my understanding of the kendo window's refresh() method may be incorrect. If it is, could you please explain what refresh() does, and advise on how to accomplish the desired behavior?
Main page has department employees listed on it. When an employee name is clicked, a popup window opens, showing the employee's calendar. Then the popup can be closed by the user, and another employee's name can be clicked, and their calendar should be displayed. And so on and so on. The calendar must change when currentEmployeeID changes.
My code below isn't working as I expected: the calendar does not change, even though on the second and subsequent times, refresh() is being invoked with a different URL.
Main page has department employees listed on it. When an employee name is clicked, a popup window opens, showing the employee's calendar. Then the popup can be closed by the user, and another employee's name can be clicked, and their calendar should be displayed. And so on and so on. The calendar must change when currentEmployeeID changes.
My code below isn't working as I expected: the calendar does not change, even though on the second and subsequent times, refresh() is being invoked with a different URL.
currentEmployeeID = //user makes a selection
and employeeName is also changed accordingly
if
(!mydiv.data(
"kendoWindow"
) ) {
mydiv.kendoWindow({
iframe:
true
,
title: employeeName,
content:
"calendar.htm?eeid="
+currentEmployeeID;
type:
"GET"
}
});
mydiv.data(
"kendoWindow"
).open();
}
else
{
mydiv.data(
"kendoWindow"
).refresh({
iframe:
true
,
type:
"GET"
,
title: employeeName,
url:
"calendar.htm?eeid="
+currentEmployeeID
});
mydiv.data(
"kendoWindow"
).open();
}