0
私のサーバーのサイドページ(getEvents.cfm)から次の文字列を返しています。私はColdFusionで働いています。myfeeds.php(サーバー側)から返すもの
[
{
title: 'Event1',
start: '2012-02-02',
end: '2012-02-02',
allDay: 'no'
},
{
title: 'Event2',
start: '2012-02-03',
end: '2012-02-03',
allDay: 'no'
}
]
ただし、イベントを取得中にエラーが発生しました。ページの読み込みにエラーが発生しました。ここで
私はイベントを取得するために使用していたコードです:すべてのallDay
の
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...
]
アディル、ええ、JSONオブジェクトは文字列で囲まれたキーと値の両方を持っている必要があることを忘れないでください。 http://json.org/example.html –
ありがとうございました。 私はjSonを初めて使用しています。私はフォーマットを見つけました: http://arshaw.com/fullcalendar/docs/event_data/Event_Source_Object/ 彼らは間違ったjSonフォーマットを提供しているかもしれません。 もう一度お返事ありがとうございます –
はい、大文字と小文字の区別を保持するためにキーを引用する必要があります。そうでない場合は、大文字と小文字の区別が必要です –