Ajax error on my JSON calls
I just upgraded to fullcalendar 1.5.1 and updated jQuery to 1.5.2 ...
Here is my code:
$('#calendar_container').fullCalendar({
eventSources: [
{
url: '/myapp/calendar/TestJSON.jsp',
type : 'POST',
error: function() {
alert('there was an error while fetching events!');
}
}
]
)}
Anyway my JSON feeds seem to have broken, jQuery is getting some sort of ajax error. With Firebug I see that the call being made is: http://localhost:8080/myapp/calendar/TestJSON.jsp?callback=jQuery1520173438877011995_1303227625166
The error alert pops up and if I examine Firebug I see an 'ajax开发者_开发知识库Error'. Now the JSON is coming through (I can see it in the Firebug response). The statusText is 'parsererror'.
I have already validated the JSON with JSONLint. I have even tried 'hard coding' the JSON. The callback parameter had me worried so I added jsonp: false to the event source but while I was able to eliminate the callback parameter the error persisted. I also tried changing the type to gET instead of POST, but to no avail.
Here is the hardcoded JSON from TestJSON.jsp:
[{"id":111,"title":"Event1","start":"2011-04-10"},{"id":222,"title":"Event2","start":"2011-04-20","end":"2011-04-22"}]
Update
I figured it out, it was a plugin conflict between jQuery 1.5.2 with jquery validation, but there is a fix here: https://github.com/jaubourg/jquery-validation/raw/master/jquery.validate.min.js
精彩评论