fancybox+fullCalendar 做日程管理 为什么老是出现 The requested content cannot be loaded. Plea

markfun 2017-02-15 11:03:13
具体代码如下:
<script src='jquery-ui-1.10.3/jquery-1.9.1.js'></script>
<script src='jquery-ui-1.10.3/ui/jquery-ui.js'></script>
<script src='js/fullcalendar.js'></script>
<script src='js/jquery.fancybox-1.3.1.pack.js'></script>

<script type="text/javascript">
$(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
firstDay:1,//每行第一天为周一
dragOpacity: {
agenda: .5,
'':.6
},
eventDrop: function(event,dayDelta,minuteDelta,allDay,revertFunc) {
$.post("do.php?action=drag",{id:event.id,daydiff:dayDelta,minudiff:minuteDelta,allday:allDay},function(msg){
if(msg!=1){
alert(msg);
revertFunc();
}
});
},

eventResize: function(event,dayDelta,minuteDelta,revertFunc) {
$.post("do.php?action=resize",{id:event.id,daydiff:dayDelta,minudiff:minuteDelta},function(msg){
if(msg!=1){
alert(msg);
revertFunc();
}
});
},


selectable: true,
select: function( startDate, endDate, allDay, jsEvent, view ){
var start =$.fullCalendar.formatDate(startDate,'yyyy-MM-dd');
var end =$.fullCalendar.formatDate(endDate,'yyyy-MM-dd');
$.fancybox({
'type':'ajax',
'href':'event.php?action=add&date='+start+'&end='+end
});
},




events: [
{
title: 'All Day Event',
start: '2016-12-01'
},
{
title: 'Long Event',
start: '2016-12-07',
end: '2016-12-10'
},
{
id: 999,
title: 'Repeating Event',
start: '2016-12-09T16:00:00'
},
{
id: 999,
title: 'Repeating Event',
start: '2016-12-16T16:00:00'
},
{
title: 'Conference',
start: '2016-12-11',
end: '2016-12-13'
},
{
title: 'Meetingss',
content:'dadadadad',
start: '2017-02-15 10:30:00',
end: '2017-02-15 12:30:00'
},
{
title: 'Lunch',
start: '2016-12-12T12:00:00'
},
{
title: 'Meeting',
start: '2016-12-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2016-12-12T17:30:00'
},
{
title: 'Dinner',
start: '2016-12-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2016-12-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2016-12-28'
}
],
dayClick: function(date, allDay, jsEvent, view) {
var selDate =$.fullCalendar.formatDate(date,'yyyy-MM-dd');

$.fancybox({
'type':'ajax',
'href':'event.php?action=add&date='+selDate
});

},
eventClick: function(calEvent, jsEvent, view) {
$.fancybox({
'type':'ajax',
'href':'event.php?action=edit&id='+calEvent.id
});
}
});

});
</script>

</head>

<body>

<div id="main" style="width:1060px">
<div id='calendar'></div>
</div>

具体错误应该在这里
$.fancybox({
'type':'ajax',
'href':'event.php?action=add&date='+selDate
});
我不知道type:ajax就出现The requested content cannot be loaded.
Please try again later.错误,改成type:iframe就能弹出框了,但是没用啊,我需要的是ajax
不知道是什么原因
各位大神帮帮忙
...全文
1377 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧