Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/414.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 从event.Click、event.Resize和eventDrop返回时,当移动到其他视图或日历页时,NaN会出现在任何地方_Php_Javascript_Jquery_Fullcalendar - Fatal编程技术网

Php 从event.Click、event.Resize和eventDrop返回时,当移动到其他视图或日历页时,NaN会出现在任何地方

Php 从event.Click、event.Resize和eventDrop返回时,当移动到其他视图或日历页时,NaN会出现在任何地方,php,javascript,jquery,fullcalendar,Php,Javascript,Jquery,Fullcalendar,我正在使用PHP处理JQuery和Javascript,并集成fullcalendar 我很高兴看到日历上有几个月和几个星期的事件。我也很高兴使用event.Click、event.Resize和eventDrop在fullcalendar中创建和编辑事件 然而,当我从编辑中返回并尝试更改月/周等时,我只会在我希望看到的任何地方看到NaN,如天等。更新是在包含iframe的覆盖div上完成的。iframe中的脚本调用javascript函数关闭div,并使用reFetchEvents刷新日历。原

我正在使用PHP处理JQuery和Javascript,并集成fullcalendar

我很高兴看到日历上有几个月和几个星期的事件。我也很高兴使用event.Click、event.Resize和eventDrop在fullcalendar中创建和编辑事件

然而,当我从编辑中返回并尝试更改月/周等时,我只会在我希望看到的任何地方看到NaN,如天等。更新是在包含iframe的覆盖div上完成的。iframe中的脚本调用javascript函数关闭div,并使用reFetchEvents刷新日历。原始页面可以重新显示,但是当导航到日历的另一部分时,我看到了所描述的效果

日历显示脚本中的相关代码段

function close_upd(){  
/* called by update script in iframe after user hits submit/cancel */  
    $("#update").dialog('close');  
    $("#calendar").fullCalendar('refetchEvents');  
}  
$(document).ready(function(){  
    $('#calendar').fullCalendar({  
        theme: true,  
        defaultView: '<?=$view;?>',  
        firstHour: 8,  
        header: {  
            left: 'prev,next today',  
        center: 'title',  
         right: 'month,agendaWeek,agendaDay'
      },
      selectable: true,  
      selectHelper: true,  
      select: function(startdate, enddate, allDay, jsEvent, view) {  
         window.scrollTo(0,0);  
         var sd = Date.parse(startdate);  
         var ed = Date.parse(enddate);  
         $("#update").html("CALLS IFRAME");  
         $("#update").dialog('open');  
      },  
      editable: true,  
      eventClick: function(calEvent, jsEvent, view) {  
         window.scrollTo(0,0);  
         var sd = Date.parse(calEvent.start);  
         var ed = Date.parse(calEvent.end);  
         $("#update").html("CALLS IFRAME");  
         $("#update").dialog('open');  
      },  
      eventResize: function(calEvent,dayDelta,minuteDelta,revetFunc) {  
         var sd = Date.parse(calEvent.start);  
         var ed = Date.parse(calEvent.end);  
         $.post('./event_update2.php',{'allday':'false', 'event':calEvent.id, 'start':sd,'end':ed}, function(response){  
            if(response.length > 0){  
               alert(response);  
               revertFunc();  
            }  
         });  
      },  
      eventDrop: function(calEvent,dayDelta,minuteDelta,allDay,revetFunc) {  
         var sd = Date.parse(calEvent.start);  
         var ed = Date.parse(calEvent.end);  
         $.post('./event_update2.php',{'allday':allDay, 'event':calEvent.id, 'start':sd, 'end':ed}, function(response){  
            if(response.length > 0){  
               alert(response);  
               revertFunc();  
            }  
         });  
      },  
      eventMouseover: function( event, jsEvent, view ) {  
         var showdatea = $.fullCalendar.formatDate(event.start,"dS MMM yyyy");  
         var showdateb = $.fullCalendar.formatDate(event.start,"hh:mm");  
         showToolTip(jsEvent,event.title+" "+showdatea+" Starts At "+showdateb+" "+event.desc);  
      },  
      eventMouseout: function( event, jsEvent, view ) {  
         hideToolTip();  
      },  
      events: './event_find.php?from=PP'  
   });  
});  

萤火虫告诉你什么?是否所有内容都正确地从服务器获取?第一次呈现日历时,您将能够第一次检查事件_find.php?from=PP的GET中返回的内容。那么第二次,在关闭编辑覆盖后,服务器是否使用相同的GET数据和新的编辑更改进行响应

之后,当您单击prev/next时,它现在是否在GET中加载不同的数据

了解这一点将是了解情况的良好开端