Hi does anyone know if the following line invokes the onViewChange() function???
scheduler.updateCollection("vehicles", result);
The reason I ask is that the following code causes an infinite loop where all I’m looking to do is update sections when the view is changed.
[code]scheduler.attachEvent(“onBeforeViewChange”, function(old_mode,old_date,mode,date){
if (typeof old_date === “undefined”) {
return true;
}
else
{
day = zeroPad(date.getDate(), 2);
month = zeroPad(date.getMonth() + 1, 2);
year = date.getFullYear();
new_date = day + "-" + month + "-" + year;
get_all_diary_vehicles(new_date, function(result)
{
scheduler.updateCollection("vehicles", result);
});
return true;
}
});
[/code]