【发布时间】:2014-11-11 07:09:05
【问题描述】:
我正在尝试将 fullCalendar 插件升级到版本 2,现在由 php 脚本生成的事件根本没有显示。 php 脚本可以正常工作,因为如果我直接将其输出放入 fullCalendar 对象的 events 属性中,如下所示:
events: <? require ("calendario_eventi.php"); ?>,
事件显示正确。
如果我尝试使用这样的 JSON 提要检索事件:
events: {
url: "calendario_eventi.php",
type: 'GET',
data: {
id_utente: '<?print $id_ut?>',
all: '<?print $all?>'
},
success: function(a, b, c) {
alert('success');
},
error: function(a, b, c) {
alert('there was an error while fetching events!'+a+b+c);
}
}
插件返回“成功”但不在日历中显示事件。
php 脚本生成这段代码:
[{"title":"Azienda: NOME AZIENDA S.r.l.Utente: NOME COGNOMESegnalazione: Segnalare i campi obbligatori con un asterisco.","start":"2014-09-01T08:30:00+0200","end":"2014-09-01T09:30:00+0200","allDay":false,"className":"segnalazione_cal","id":"1685","editable":false},{"title":"Azienda: NOME AZIENDA S.r.l.Utente: NOME COGNOMESegnalazione: Mettere le apparecchiature elencate nel menu a tendina del campo \\\"Apparecchiature\\\" in ordine alfabetico.","start":"2014-09-01T08:30:00+0200","end":"2014-09-01T09:30:00+0200","allDay":false,"className":"segnalazione_cal","id":"1684","editable":false},{"title":"Azienda: MyFGAS DemoUtente: Resp. tecnico tecnicoSegnalazione: PROVA MY GAS","start":"2014-09-01T08:30:00+0200","end":"2014-09-01T09:30:00+0200","allDay":false,"className":"segnalazione_cal","id":"1683","editable":false}]
【问题讨论】:
标签: php json fullcalendar