My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 453: Enable resetting option{events:"myfunc.php"} when calling refetchEvents
2 people starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Apr 2010


Sign in to add a comment
 
Reported by singactd...@gmail.com, Apr 20, 2010
There's probably a way to do this which I can't figure out. But it seems
that the src value below should be an easy to update property.

I'd like to enable user to filter the calendar by using a dropdown that
calls refetchEvents.



$.ajax({
					url: src,
					dataType: 'json',
					data: params,
					cache: options.cacheParam || false, // don't let jquery prevent
caching if cacheParam is being used
					success: reportEventsAndPop
				});

Apr 27, 2010
#1 naunaud...@gmail.com
Hi,

You could do something like:

events: function(start, end, callback) {
            $.ajax({
                url: eventSource+filter,
                dataType: 'json',
                data: {
                    _ : Math.round(start.getTime() / 1000),
                    start: Math.round(start.getTime() / 1000),
                    end: Math.round(end.getTime() / 1000)
                },
                success: function(s) {
                    callback(s);
                }
            });
        }

In my example, my variable eventSource is the location of my PHP script that is
returning json encoded string (and it's preformated to suit fullCalendar, I just
throw the response in the callBack) , my filter variable is changed with a select in
my page, and I do a refetchEvents everytime I change something in that select.

Hope this helps you figuring out things.

Regards,

Naunaud.
Apr 27, 2010
Project Member #2 adamrs...@gmail.com
yeah, as naunaud128 said, the custom events function is the swiss army knife you need to do this sort of 
thing
Status: Done
Sign in to add a comment

Powered by Google Project Hosting