SCRIPT438:对象不支持属性或方法" itemsInBasket'在ie9

时间:2014-12-17 07:55:43

标签: jquery ajax jquery-ajaxq

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:对象不支持属性或方法&#39; itemsInBasket&#39;

0 个答案:

没有答案