| Issue 664: | pass an option to the JSON event feed | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hi, I am using fullCalendar with Expression Engine. I have created a php page in Expression engine that can parse the information and return it properly, but I cannot get the information dynamically. In order for full calendar to fetch the proper results for the page that it is on, I need to pass a variable to the JSON feed, so it can use that information, build the JSON needed, and then send the proper info back to full calendar. Is there a way for me to attach an option to send to the php file so it can parse the correct info and then return it to full calendar? many thanks, Ryan
Oct 11, 2010
#1
ryanpcha...@gmail.com
Oct 11, 2010
Do I need to enter events as a function to make this happen?
Oct 11, 2010
I am trying to do the following...
$('#calendar').fullCalendar({
header: {
left: 'month,agendaWeek,agendaDay',
center: 'title',
right: 'prev,next today'
},
editable: false,
events: ""
events: function(start, end, callback) {
$.ajax({
url: '{path=projects/cal_feed}',
data: 'segment : {segment_3}',
success: function(doc) {
var events = [];
$(doc).find('event').each(function() {
event.push({
title: $(this).attr('title'),
start: $(this).attr('start') // will be parsed
});
});
callback(events);
}
});
}
});
How would I read in the 'segment : {segment_3}' part of the data option in my php page?
Nov 10, 2010
See the jQuery documentation for the AJAX request: http://api.jquery.com/jQuery.ajax/ You can set any extra parameters which you then can read from $_GET/$_POST.
Nov 21, 2010
looks like you need your data option like this:
data: {
path: 'projects/cal_feed',
segment: 'segment_3'
}
not sure though
but this problem is concerning your use of jquery, not fullcalendar itself. closing
Status:
Done
Nov 21, 2010
this feature <https://code.google.com/p/fullcalendar/issues/detail?id=386>, when implemented, might be of use to you |
|
| ► Sign in to add a comment |