Commit 0e80ebbd by yasir

tess

1 parent 1e88a745
......@@ -268,25 +268,34 @@
var txId = $('#tx_id').html();
var urinya = "${request._host}${params.route}/advice/act/?id=" + mID;
console.log("${request._host}");
$.ajax({
type: 'GET',
url: urinya,
dataType: 'JSON',
crossDomain: true,
headers: {
"Access-Control-Allow-Origin": "http://devel.agratek.id"
},
success: function (data) {
jsonnya = {
"invoice_no": data.invoice_no,
"message": data.message,
"status": data.status,
"tx_id": data.tx_id
};
jsonnya = JSON.stringify(jsonnya, null, 4);
$('#advice').val(jsonnya);
}
$.getJSON( urinya)
.done( function(resp){
// handle response here
console.log(resp);
}).fail(function(){
alert('Oooops');
});
// $.ajax({
// type: 'GET',
// url: urinya,
// dataType: 'JSON',
// crossDomain: true,
// headers: {
// "Access-Control-Allow-Origin": "http://devel.agratek.id"
// },
// success: function (data) {
// jsonnya = {
// "invoice_no": data.invoice_no,
// "message": data.message,
// "status": data.status,
// "tx_id": data.tx_id
// };
// jsonnya = JSON.stringify(jsonnya, null, 4);
// $('#advice').val(jsonnya);
// }
// });
});
});
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!