cors - FullCalendar Cross Domain Issue -


i'm trying set fullcalendar on localhost test out. here's code:

$( '.calendar' ).fullcalendar( {     header: {         left: 'prev,next today',         center: 'title',         right: 'month,agendaweek,agendaday'     },     eventsources: [         {             url: "http://www.google.com/calendar/feeds/feed_one",             classname: 'feed_one'         },         {             url: "http://www.google.com/calendar/feeds/feed_two",             classname: 'feed_two'     ] } ) 

i got error in console instead, , events not displayed:

xmlhttprequest cannot load http://www.google.com/calendar/feeds/feed_one.  origin http://localhost not allowed access-control-allow-origin. localhost:1  xmlhttprequest cannot load http://www.google.com/calendar/feeds/feed_two.  origin http://localhost not allowed access-control-allow-origin. localhost:1 

from research seems cross-origin-resource-sharing issue, don't know how fix it.

would appreciate if me out, or point me in right direction.

you need make jsonp request cross domain access. please set following properties , check if works out you.

you can detailed description of jsonp on here...

eventsources: [     {         url: "http://www.google.com/calendar/feeds/feed_one",         datatype : 'jsonp',         classname: 'feed_one'     },     {         url: "http://www.google.com/calendar/feeds/feed_two",         datatype : 'jsonp',         classname: 'feed_two', ] 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -