Note that there are some explanatory texts on larger screens.

plurals
  1. POFullCalendar - How can I save an event back to my JSON file when I add it by clicking on a day?
    primarykey
    data
    text
    <p>I can get the new event to show on the calendar but when I refresh my screen it disappears. I want the new event to be saved in my JSON (json-events.php) file. I have absolutely no idea how to do this. </p> <p><a href="http://www.lwwjournals.com/testSite/jquerycalendar.html" rel="nofollow">http://www.lwwjournals.com/testSite/jquerycalendar.html</a></p> <p>here's my HTML</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;link href="scripts/FullCalendarCSSjava/fullcalendar.css" rel='stylesheet' /&gt; &lt;link href="scripts/FullCalendarCSSjava/jquery-ui-1.10.3.custom.css" rel='stylesheet' /&gt; &lt;link href="scripts/FullCalendarCSSjava/fullcalendar.print.css" rel='stylesheet' media='print' /&gt; &lt;script src="scripts/FullCalendarCSSjava/jquery-1.9.1.min.js"&gt;&lt;/script&gt; &lt;script src="scripts/FullCalendarCSSjava/jquery-ui-1.10.3.custom.js"&gt;&lt;/script&gt; &lt;script src="scripts/FullCalendarCSSjava/fullcalendar.min.js" &gt;&lt;/script&gt; &lt;script&gt; $(window).load(function(){ var calendar=$('#calendar').fullCalendar({ aspectRatio: 2, weekMode: 'liquid', weekNumbers: true, events: "json-events.php", selectable: true, selectHelper: true, select: function(start, end, allDay) { var title=prompt("Please enter your name:","Your name"); calendar.fullCalendar('renderEvent', { title: title, start: start, end: end, allDay: allDay }, true // make the event "stick" ); calendar.fullCalendar('unselect'); }, loading: function(bool) { if (bool) $('#loading').show(); else $('#loading').hide(); }, eventRender: function (event, element, view) { element.attr('href', 'javascript:void(0);'); element.attr('onclick', 'javascript:openModal("' + event.title + '","' + event.description + '","' + event.url + '");'); }, }); }); function openModal(title, info, url) { $("#eventInfo").html(info); $("#eventLink").attr('href', url); $("#eventContent").dialog({ modal: true, title: title }); } function printpage() { window.print() } &lt;/script&gt; &lt;style&gt; @font-face { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; src: local("Trebuchet MS", Arial, Helvetica, sans-serif), url('fonts/"Trebuchet MS", Arial, Helvetica, sans-serif.ttf') format('opentype'); } body { text-align: center; font-size: 14px; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; width: 87%; height:100%; overflow:auto; margin: 30px auto 0 auto; } #calendar { width: 100%; height:100%; overflow:auto !important; margin-top:10px; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="calendar" class="print" align="center"&gt;&lt;/div&gt; &lt;div id="eventContent" class="dontprint" title="Event Details" style="font-size:13px;display:none;"&gt; &lt;div id="eventInfo"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload