views:

155

answers:

1

Hi, I got a page that returns json info from a cfc. the json looks like this:

[{"allday":true,"title":"event1","userid":1,"end":"","classname":"","editable":true,"start":"2010-09-01","id":1,"url":""},{"allday":true,"title":"event2","userid":1,"end":"","classname":"","editable":true,"start":"2010-09-10","id":2,"url":""},{"allday":true,"title":"event3","userid":1,"end":"","classname":"","editable":true,"start":"2010-09-15","id":3,"url":""}]

When I use: $(document).ready(function() { //Create JQuery connection to obj $('#event').hide(); //Make event bubble draggable $('#event').draggable();

$('#evBubbleClose').click(cleanEventBubble);
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
    // put your options and callbacks here
    dayClick:function(date, allDay, jsEvent, view){
       createEvent(date, allDay, jsEvent, view, this);
    },
    events: 'http://xxxxx/cfc/FullCalendarEvents.cfc?method=getEvents' ,
    theme: true,
    header: {left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, 
    editable:true
});

}); The events do not render, however if I copy and paste the json in event: JSON Array here, it will show the events.

What am I doing wrong that the events don't render from a feed?

A: 

Where you are specifying a FQDN for your event URL, is it the same FQDN as the calling page? If jQuery is used to call an AJAX function on a different domain, subdomain, or protocol (like calling http from https) then you must use a JSONP wrapper.

Details about Same Origin Policy and jQuery annd JSON.

Ben Doom
It was actually a stupid human error. ColdFusion was returning extra junk with the JSON content I had to disable that. It is working now
kevin