Javascript ReferenceError:无法找到变量

时间:2017-10-07 14:58:49

标签: javascript php ajax

  

ReferenceError:无法找到变量:PO845191

<a class="dropdown-item" class="btn-group btn-group-xs" ><button class="btn btn-link"  onClick="underReviewPo('.$row->po_id.')">Convert To Under Review</button>

我的javascript无法正常工作,它显示此错误&#34; ReferenceError:无法找到变量:PO845191&#34; 但是,如果我使用int,则不会发生错误。

这是针对Ajax:

function requestBuyerSign(poID) {   
        swal({
              title: "Request Signature",
              text: "Confirm To Request Signature To Buyer",
              icon: "success",
              buttons: true,
              dangerMode: false,
            }).then((willConvert) => {
          if (willConvert) {
            $.ajax({
                url:"<?= base_url() ?>PurchaseOrder/request_buyer_signature/"+poID,
                type:"POST",
                data:{poID:poID},
                success:function(data){
                    if(data=='success'){
                        swal("Request Has Been Sent",{
                            icon:'success',
                    });
                    }else{
                        swal("Error Occured",{
                            icon:"error"
                    });

                    }
                    dataTable.ajax.reload();
                    incomplete.ajax.reload();
                    pofr.ajax.reload();
                }
            });
          } 
        });
        }

0 个答案:

没有答案