Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/234.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 如何更新完整日历_Php_Jquery_Fullcalendar - Fatal编程技术网

Php 如何更新完整日历

Php 如何更新完整日历,php,jquery,fullcalendar,Php,Jquery,Fullcalendar,我是php和fullcalendar的初学者。我需要使用用户输入值($(“#name”)更新日历。但它不起作用 我有这个密码 $(document).ready(function() { var UsrAux; $('#name').blur(function(){ UsrAux = $('#name').val() // <-- This is the input });

我是php和fullcalendar的初学者。我需要使用用户输入值($(“#name”)更新日历。但它不起作用

我有这个密码

$(document).ready(function() {
    var UsrAux;
     $('#name').blur(function(){                    
        UsrAux = $('#name').val()      // <-- This is the input
      });                 


    $('#calendar').fullCalendar({
        draggable: true, 
        height: 400,    
        cache: true, 
        eventSources: [
    // your event source
        {
            url: 'CalendarServer.php',
            type: 'POST',
            data: {                     
                    uno: 'Something',   
                    UsrCdg: UsrAux                                          
            },
            error: function() {
                alert('error!');
            },
            color: '#e2ebef',   // a non-ajax option
            textColor: 'black' // a non-ajax option
        }
        ]       
      });


}); 
$(文档).ready(函数(){
var UsrAux;
$('#name').blur(函数(){

UsrAux=$('#name').val()/在
fullCalendar
获取您需要的数据(用户输入)时,应在它之前定义
blur
事件函数。

Hi这是解决方案

$(document).ready(function(){

        var UsrAux;     
        UsrAux=$('#name').val();                  
         $('#name').blur(function(){    
            UsrAux=$('#name').val();                        
            var source =   {
                    url: 'CalendarServer.php',
                    type: 'POST',
                    data: {                         // Parms
                            uno: 'Somenthing',  
                            UsrCdg: UsrAux                                          
                    },
                    error: function() {
                        alert('error!');
                    },
                    color: '#e2ebef',   // a non-ajax option
                    textColor: 'black' // a non-ajax option
            };                               
            $('#calendar').fullCalendar('removeEvents');
            $('#calendar').fullCalendar('addEventSource', source);
            });  



        $('#calendar').fullCalendar({
            draggable: true, 
            height: 400,    
            cache: true, 
            eventSources: [
        // your event source
            {
                url: 'CalendarServer.php',
                type: 'POST',
                data: {                         // Parms
                        uno: 'something',   
                        UsrCdg: $('#name').val()                                            
                },
                error: function() {
                    alert('error!');
                },
                color: '#e2ebef',   // a non-ajax option
                textColor: 'black' // a non-ajax option
            }
            ]       
          });


          });

您好,谢谢您的回答。我在fullcaledar之前定义了模糊。但是它不起作用。最后您好。这是我的解决方案。