title: Simple save to JSON file with JQuery
body: <p>I've tried out all examples I could get my hands on, yet I can't simply save JSON data to a JSON file on my host. I want to start with a simple as possible save method so I have a place to start from.</p>
  
  <p><strong>Here's what I got:</strong>
  Basically I have a button in my <strong>index.html</strong> which on click should save data to my general.json file (same location as index.html).</p>
  
  <pre><code>&lt;button id="savebtn"&gt;Save&lt;/button&gt;
  </code></pre>
  
  <p>With id selector in a <strong>myscript.js</strong> I do this:</p>
  
  <pre><code>$('#savebtn').click(function() {
                  var saveit = $('#calendar').fullCalendar( 'clientEvents');
  
          var eventsholded = [];
  
      $.each(saveit, function(index,value) {
          var event = new Object();
          event.id = value.id;            
          event.start = value.start;
          event.end = value.end;
          event.title = value.title;
      event.allDay = value.allDay
          eventsholded.push(event);
      }); 
      $.ajax
      ({
          type: "GET",
          dataType : 'json',
          async: false,
          url: 'general.json',
          data: JSON.stringify(eventsholded),
          success: function () {alert("Thanks!"); },
          failure: function() {alert("Error!");}
      });
  </code></pre>
  
  <p>As you can see I want to store events from fullcalendar. That is not very relevant because it works fine till this point.
  <strong>If I alert on screen JSON.stringify(eventsholded)</strong> you will see this: </p>
  
  <pre><code>[{"start":"2014-01-07T08:30:00.000Z","end":"2014-01-07T12:30:00.000Z","title":"Pumukli Pista","allDay":false},{"start":"2014-01-11T13:30:00.000Z","end":"2014-01-11T18:30:00.000Z","title":"Fanic Catalin","allDay":false}]
  </code></pre>
  
  <p>Now <strong>this is exactly what I want to save to server in simple, quick, maybe unsecure, but very simple way.</strong> Just so I can start to understand how this works, just to have that in my general.json file.</p>
  
  <p>The <code>$.ajax</code> part does nothing in my above code. Not even alerting "Error". The rest of the code works as expected.</p>
  
  <p><strong>Security is not important now.</strong> I just want to learn how it works.</p>
  
  <p><strong>I will be grateful for any help or useful links that have complete examples. Thank you!</strong></p>