title: Adding events as json array in FullCalendar?
body: <p>I have a web page (written with PHP/Zend) with a full calendar component which is driven by a combo-box. This combo-box is used to switch from one calendar to another. Each time the user changes the value of the combo-box, we fetch the events in the database and "json" them as an array to the JavaScript. Then, we erase all events from the present calendar (empty current calendar) and add the newest event... but it does not work.</p>
  
  <p>As the query to obtain all the events between two dates is long to execute we want to make it once for each calendar (each time user change the value of the combo-box).</p>
  
  <p>My JavaScript code where <code>$('#planning').val()</code> is the combo-box value.  The result variable contains a JSON array which has been validate.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function()
  {
      $("#planning").change(function()    {
          $.post(
              '/Jerome/public/index/update-calendar', 
              { planning: $('#planning').val() },
              function(result) {
                  $('#calendar').fullCalendar('removeEvents');
                  $('#calendar').fullCalendar(result); //not working 
                      $('#calendar').fullCalendar( 'addEventSource',result);//not working
                  $('#calendar').fullCalendar( 'refetchEvents' ); //anything change
                              $('#calendar').fullCalendar( 'rerenderEvents' ); //anything change
                  });
          });     
  
  });
  
  &lt;/script&gt;
  </code></pre>