FullCalendar未从JSON加载,Chrome除外
FullCalendar not loading from JSON except in Chrome
我正在使用FullCalendar制定剧院排练时间表,并决定JSON是从MySQL数据库中提取事件的最佳方式。在日历页面的JavaScript中,我正在做:
$(document).ready(function() {
$('#calendar').fullCalendar({
events: '/eventsfeed.php',
[...]
我的JSON提要返回了这个消息,标题是"Content-type:application/JSON":
[
{
"title" : "First Show",
"start" : "2012-04-26 19:00:00 EST",
"end" : "2012-04-26 21:00:00 EST",
"allDay" : 0,
"comments" : "Good show everyone!",
"scenes" : "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50",
"id" : "1",
"location" : "place",
"userid" : "1"
},
{
"title" : "derp",
"start" : "2012-01-21 13:59:59 EST",
"end" : "2012-01-21 23:59:59 EST",
"allDay" : 0,
"comments" : "test event",
"scenes" : "1,16,24",
"id" : "2",
"location" : "narnia",
"userid" : "1"
}
]
现在,这在Chrome中运行得很好,但我的任何事件都不会显示在Firefox或Safari中,而且它们曾经在我将事件添加为Javascript数组时显示。如果AJAX在检索JSON提要时失败,我尝试用一种方法声明JSON提要,即抛出alert(),但它从来没有做任何事情。我检查了浏览器中是否启用了Javascript,并尝试将JSON提要的内容类型更改为text/html和text/plain,但仍然没有成功。我在这里错过了什么?谢谢
啊,我发现了,日期中的EST打破了一切。FullCalendar的文档中说可以,但我想这是错误的。(最初发布于2012/01/26作为评论)
相关文章:
- Chrome WebKitGetUserMedia
- JQueryhide()不适用于Mozzilla,但适用于Chrome
- 在chrome.tabs.onCreated之后加载HTML页面
- chrome扩展中的navigator.geolocation.getCurrentPosition
- chrome扩展:尽管运行了at:documentidle,js脚本还是过早启动
- document.open/document.write没有正确地清除chrome中的文档——这是chrome的错误吗
- chrome扩展更改主机/域警告
- Chrome开发工具(如何知道我在调用哪个javascript对象)
- 如何在chrome扩展中重定向到html页面
- Chrome扩展没有't在重新加载之前考虑期权价值
- Google/html5语音识别JavaScript SDK Chrome网络工具包SpeechRecognition
- 激活chrome上的chrome.notifications对象
- 如何通过自己获得Chrome扩展的用户反馈/错误报告
- JS可以在Chrome中工作,但不能在Firefox中工作
- Chrome加载旧版本的Javascript文件
- 试图阻止Chrome通过扩展关闭
- 如何在chrome扩展中存储数据/结果,以及如何使用setTimeout使其只被调用一次
- 角度材质日期选择器位置错误,Chrome除外
- FullCalendar未从JSON加载,Chrome除外
- Firefox和Chrome中的Ajax POST问题,但IE8除外