events as JSON feed, but passing extra parameters?

拥有回忆 提交于 2020-01-14 03:13:09

问题


in the example code we're able to get events from a JSON feed by passing a URL.

$('#calendar').fullCalendar({ events: "/myfeed.php" });

fullCalendar will visit a link like this: /myfeed.php?start=1262332800&end=1265011200&_=1263178646

Can I pass extra parameters to myfeed.php url? for example if I wanted to restrict events that are returned for a specific resource id.

ex: /myfeed.php?resourceid=1&start=1262332800&end=1265011200&_=1263178646

Thanks


回答1:


Yes this has worked for me in the past. So your code should just be:

$('#calendar').fullCalendar({ events: "/myfeed.php?resourceid=1" });

Now I'm just having problems crossing domains!



来源:https://stackoverflow.com/questions/3240699/events-as-json-feed-but-passing-extra-parameters

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!