jquery fullcalendar send custom parameter and refresh calendar with JSON

Posted by geo on Stack Overflow See other posts from Stack Overflow or by geo
Published on 2012-03-21T08:38:35Z Indexed on 2013/10/26 3:55 UTC
Read the original article Hit count: 657

Filed under:
|
|

im trying to use the jquery fullcalendar. The event data comes from the server using JSON. My page has a dropdown element and the fullcalendar div.

What i need is to refresh the calendar each time the user changes the dropdown. The selected value of the dropdown should be posted to the server in order to fetch the new event data

Here is my code

     $(document).ready(function() {
        $('#calendar').fullCalendar({
            events: {
                url : '/myfeed',
                data : {personId : $('#personDropDown').val() }
            }
        });

        $('#personDropDown').change(function(){
            $('#calendar').fullCalendar('refetchEvents');
        });

    });

The code above however doesnt work. Any help?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JSON