title: Add an event with fullCalendar using a form
body: <p>I'm trying to add an event using fullCalendar. Here is my add_event.php . I have first a form where a user can put information like the title of the event, start date, end date , ect.. and after the form I have this jquery code.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
      function add_event()
      {  
          var form = $('#calendar').serialize();
  
          $.ajax({   
                  type : 'POST',  
                  url: '&lt;?php echo site_url()."/public/calendar/addEvent" ?&gt;',
                  method: 'post',
                  data: form,
                  success: function(data)
                  {   
                       if(data == 'true')
                         {   
                            var event = {
                          title : "AJAX",
                          start : "2012-08-16",
                          end   : "2012-08-17"
                             };
  
                                                $('#calendar').fullCalendar( 'renderEvent', event, true )
                       }                  
                       else
                      {   
                          // Display error
                      }  
              }
  
  
          });
      document.write('end');}
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Now I just hard code the "add event", "end" is printed but the event isn't added to the calendar. What I am doing wrong?
  Also, I would like to know how can the controller send the values of start date, end date , ect ?</p>
  
  <p>Thank you for your help.</p>