从 myfeeds.php 返回什么(服务器端)
我从服务器端页面 (getEvents.cfm) 返回以下字符串。我在 ColdFusion 工作。
[
{
title: 'Event1',
start: '2012-02-02',
end: '2012-02-02',
allDay: 'no'
},
{
title: 'Event2',
start: '2012-02-03',
end: '2012-02-03',
allDay: 'no'
}
]
但我在页面加载时收到错误“获取事件时出错!”
这是我用来获取事件的代码:
eventSources: [
// your event source
{
url: '../getevents.cfm',
type: 'POST',
data: {
custom_param1: 'something',
custom_param2: 'somethingelse'
},
error: function() {
alert('there was an error while fetching events!');
},
color: 'yellow', // a non-ajax option
textColor: 'black' // a non-ajax option
}
// any other sources...
]
I am returning the following string from my server side page (getEvents.cfm). I am working in ColdFusion.
[
{
title: 'Event1',
start: '2012-02-02',
end: '2012-02-02',
allDay: 'no'
},
{
title: 'Event2',
start: '2012-02-03',
end: '2012-02-03',
allDay: 'no'
}
]
But I get an error on page load 'there was an error while fetching events!'
Here is the code that I am using to fetch events:
eventSources: [
// your event source
{
url: '../getevents.cfm',
type: 'POST',
data: {
custom_param1: 'something',
custom_param2: 'somethingelse'
},
error: function() {
alert('there was an error while fetching events!');
},
color: 'yellow', // a non-ajax option
textColor: 'black' // a non-ajax option
}
// any other sources...
]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,
allDay
应该是 true/false 而不是 no/yes。其次,返回字符串应如下所示:First of all
allDay
should be true/false not no/yes. Second, the return string should look like this: