awesome plugin. But I tried to load some events via SQL-Rquest. The Request is successfully, I can put the Array in another Container or alert them, but the Calendar wouldnt load the events. Here my Script
$('#calendar').fullCalendar(
{
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
events: function(start, end, callback)
{
var rs = db.execute("select * from xCal");
var i = 0;
var events = '[';
while(rs.isValidRow())
{
if(i == 0){var events=events}else{events = events+','}
events=events+
"{id:'"+rs.fieldByName('id')+"',"+
"title:'"+rs.fieldByName('title')+"',"+
"allDay:'"+rs.fieldByName('allDay')+"',"+
"start:'"+rs.fieldByName('start')+"',"+
"end:'"+rs.fieldByName('end')+"',"+
"url:'"+rs.fieldByName('url')+"',"+
"description:'"+rs.fieldByName('description')+"'}";
i++;
rs.next();
}
events = events+']';
callback( events );
}
});
Udate cause comments .....
Thanks for replaying, but thats not the reason. I changed the code (removed quotes and the url complete), but it´s not running :( .
If I try to put the return of SQL request in the event-option, its runnig perfect. It seems, I have a problem with the callback();.
I have alerted the callback-var.
function(events){
callback(events);
popLoading();
}
Calls callback itself?
Update cause answer ....
See above. Believe me, the string is correct. BTW I´m using Unix timestamp ;)