0
function itemsInBasket() {
    jQuery.ajax({
        type: 'get',
        url: '/kalypso/addCartController.do?param=inCartItemsDetails_Controller',
        dataType: 'json', // ** ensure you add this line **
        success: function(data) {
            var i =0;
            var html="";
            var html2 ="";
            $.each(data, function(index, item) {
                console.log(item[i].HH_CUSTID)
               html+='<tr class="singlePrdRow" ><td align="center"><input value="'+item[i].HH_ADDCART_NO+'" name="cartOrders" type="checkbox"/><b class="sNumber ">'+i+'</b></td>';
               html+='<td>'+item[i].HH_CUSTID+'</td>';
               html+= '<td>'+item[i].HH_STYLENUM+'</td>'
               html+= '<td>'+item[i].HH_COLORID+'</td>';
               html+= '<td>'+item[i].TOTAL_QTY+'</td>';
               html+= '<td>'+item[i].HH_CUST_UNITPRICE+'</td>';
               html+= '<td>'+item[i].TOTAL_PRICE+'</td>';
               html+= '<td>'+item[i].HH_ADDCART_DATE+'</td>';
               html+= '<td><table width="100%" class="table-bordered table-striped"><tr>';
               $.each(item[i].SIZE_QTY, function(index, item) {
               html2+= '<th style="text-align:center" width="20%">'+item.SIZE+'</th>'
               })
               html+= html2+'</tr></table></td>';
               html+= '<td align="center"><a href="javascript:void(0)" class="removePrd" id="'+item[i].HH_ADDCART_NO+'" onclick="removeFromCart(this.id)"><span class="glyphicon glyphicon-trash text-danger" aria-hidden="true"></span></a></td>';
               $('#dataBinding thead').append(html);
               i++;
            });
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
            alert("some error");
        }
    }).done(function( data ) {
            viewEmptyCart();
        });
    }

我有一个名为 itemsInBasket() 的函数,它在所有浏览器中都可以正常工作,但在任何人都没有帮助我的错误是 SCRIPT438:对象不支持属性或方法“itemsInBasket”

4

0 回答 0