Commit 0e80ebbd by yasir

tess

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