Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.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
jquery在单击按钮时调用getJson_Jquery_Jquery Ui - Fatal编程技术网

jquery在单击按钮时调用getJson

jquery在单击按钮时调用getJson,jquery,jquery-ui,Jquery,Jquery Ui,如果有任何问题,我正在服务器上接收请求,并且正确发送响应。此函数未执行的原因。我错过了什么吗 答复: 成功可能是语法错误造成的。检查浏览器的JavaScript控制台/错误日志。能否添加有关收到的响应的信息?在您的案例中,“数据” $.get registered callback function is not working. var timer = setInterval(function() { $.getJSON("/resposweb/resposmonitor", {u

如果有任何问题,我正在服务器上接收请求,并且正确发送响应。此函数未执行的原因。我错过了什么吗

答复:
成功

可能是语法错误造成的。检查浏览器的JavaScript控制台/错误日志。

能否添加有关收到的响应的信息?在您的案例中,“数据”
$.get registered callback function is not working.

var timer = setInterval(function() 
{
    $.getJSON("/resposweb/resposmonitor", {updt:updateTime}, function(data)
    {
        $.each(data,function()
        {
            updateTime = this.time;
            var bActName;

            if(this.act == 'D')
                $('#'+this.idNo).remove();
            else
            {
                if(this.act == null)
                    bActName = 'Ack';
                else if(this.act == 'A')
                    bActName = 'Ready';
                var $ctrl = $('<button/>').attr({ type: 'button', name:'btn'}).addClass("btn").text(bActName).button().click(function()
                    {
                        $but = $(this)$.get("/resposweb/resposmonitor",     
                            {
                                action:'update',mod:$but.val(),idNo:$but.parent().parent().attr('id')
                            },
                            function(data)
                            {
                                console.log('data');
                                $('#cont2').append('ddefe');
                            });
                    });
                var $td1 = $('<span/>').text(this.kot);
                var $td2 = $('<span/>').text(this.tableNo);
                var $td3 = $('<span/>').attr('class','items').text(this.itemDesc);
                var $td4 = $('<span/>').text(this.qty);
                var $td6 = $('<span/>').append($ctrl);
                var $td5 = $('<li/>').attr('class','ui-widget-content').attr('id',this.idNo).append($td1).append($td2).append($td3).append($td4).append($td6);$td5.appendTo($("#selectable2"));
            }
        });
    });
},5000);