Note that there are some explanatory texts on larger screens.

plurals
  1. POFullcalendar/Fetching JSON feed(Edited)
    primarykey
    data
    text
    <p>I have a problem with the events in my fullCalendar object not showing when using ajax to fetch the data from my JSON feed. I believe the JSON format is proper though since the output from JSON.aspx is:</p> <p>[{"id":1,"title":"TESTTITLE","info":"INFOINFOINFO","start":"2012-08-20T12:00:00","end":"2012-08-20T12:00:00","user":1}]</p> <p>I used Firebug and it seems like the JSON feed is not getting fetched properly?</p> <p>When I add the upper JSON-feed directly in the events it displays properly.</p> <p><strong>(Edit) The JSON response is now working, although the events are still not displayed in fullcalendar.</strong></p> <p>JSON.aspx</p> <pre><code>public partial class JSON : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { // Get events from db and add to list. DataClassesDataContext db = new DataClassesDataContext(); List&lt;calevent&gt; eventList = db.calevents.ToList(); // Select events and return datetime as sortable XML Schema style. var events = from ev in eventList select new { id = ev.event_id, title = ev.title, info = ev.description, start = ev.event_start.ToString("s"), end = ev.event_end.ToString("s"), user = ev.user_id }; // Serialize to JSON string. JavaScriptSerializer jss = new JavaScriptSerializer(); String json = jss.Serialize(events); Response.Write(json); Response.End(); } } </code></pre> <p>And my Site.master</p> <pre><code>&lt;link href="~/Styles/Site.css" rel="stylesheet" type="text/css" /&gt; &lt;link href='fullcalendar/fullcalendar.css' rel='stylesheet' type='text/css' /&gt; &lt;script src='jquery/jquery-1.7.1.min.js' type='text/javascript'&gt;&lt;/script&gt; &lt;script src='fullcalendar/fullcalendar.js' type='text/javascript' &gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $('#fullcal').fullCalendar({ eventClick: function() { alert('a day has been clicked!'); }, events: 'JSON.aspx' }) }); &lt;/script&gt; </code></pre> <p>I've been scanning related questions for days but none of them seems to fix mine...</p>
    singulars
    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.
 

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