| Issue 957: | Adding events: events is not defined | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Can you explain why I'm getting the error "events is not defined" in Firebug
<script type="text/javascript">
$(document).ready(function() {
$('#calendar').fullCalendar({
defaultView: 'agendaWeek',
allDayDefault: false,
weekends: false,
titleFormat: " d MMMM{ '—'[ MMM] d MMMM yyyy}",
columnFormat: 'ddd',
allDayText: "",
minTime: '7:00',
maxTime: '24:00',
events: function(start, end, callback) {
$.ajax({
url: "/Xml/StaffCalendar.xml",
dataType: "xml",
data: {
start: Math.round(start.getTime() / 1000),
end: Math.round(end.getTime() / 1000)
},
success: function(doc) {
var events = [];
$(doc).find('event').each(function() {
events.push({
title: $(this).find('title'),
start: $(this).find('sDate'),
end: $(this).find('eDate')
});
});
}
});
callback(events);
}
});
});
</script>
Thanks in advance for any help
May 30, 2011
Project Member
#1
adamrs...@gmail.com
Status:
Done
|
|
| ► Sign in to add a comment |