我正在使用jQuery fullcalendar和Grails。我之前使用的是事件(作为json提要),当用户单击prev/next或更改视图时,每次都会调用json提要URL。因为我也需要检查用户会话,所以我将事件(作为json提要)更改为事件(如函数),如下所示。问题是它第一次工作,但下一次,ajax请求不会被发送到服务器,IE从缓存中显示。如果我清除浏览器缓存,则它会从服务器再次获取它。jQuery fullcalendar:事件(作为json提要)和事件(作为函数)问题在IE
所以问题是,IE缓存事件对象。我可以知道我做错了什么吗?奇怪的是,这可以在Firefox和Chrome中使用。
//events: calendarEventsURL
events: function(start, end, callback) {
$.ajax({
url: calendarEventsURL,
data: {
start: Math.round(start.getTime()/1000),
end: Math.round(end.getTime()/1000)
},
success: function(msg) {
if(msg == "no-session"){
$("#wait").html(invalidSessionMsg).fadeIn('fast',function(){
$("#wait").fadeOut(2000,function(){
window.location= "/" + $("#appName").val() + "/";
});
});
} else {
var events = [];
for(var c = 0; c < msg.length; c++){
events.push({
id: msg[c].id,
title: msg[c].title,
allDay: false,
start: msg[c].start,
end: msg[c].end
});
}
callback(events);
}
} , error: function(){
$("#wait").html(errorMsg).fadeIn('fast',function(){
});
}
});
}
谢谢非常!解决了它!完善! :) – 2010-10-18 16:09:31