[Solved] How can I access a jQuery variable from AJAX?


i was try with following code, and response is complete, but no data insert into database, and i was check the query is right :

$('#postTrx').click(function(){
var hargaBrg = $("tbody").find("tr").eq(1).find("td").eq(1).text();
var id = $("tbody").find("tr").eq(1).find("td").eq(0).text();
var jumlah = $("tbody").find("tr").eq(1).find("td").eq(2).text();


$.ajax({    
    type : "post",
    url : "input_pembelian.php",
    data: "{'idBeliBarang':" + id + ",'harga':'" + hargaBrg + "','jumlah':'" + jumlah + "}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function () {
        alert("complete");
     },
    error: function (err) {
        alert(err);
    }   
}); 

});

solved How can I access a jQuery variable from AJAX?