Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery.ajax({
- type: "POST",
- url: "http://ayambrand-com-my-v1.cloudaccess.host/index.php?option=com_echarity&format=raw&task=api.get_product_name",
- data: {dataArrayPost : Data},
- success: function(data){
- var a = JSON.parse(data);
- console.log(a);
- var prodName = a.productName;
- var splitProductName = "";
- var prodQty = a.quota;
- var splitProductQuota = "";
- var contents = '<table id="tableDonateDisplay" class="table table-hover">';
- contents += "<tr>";
- contents += '<th>' + 'Product' + '</th>' + '<th>' + 'Quantity Need' + '</th>' + '<th>' + 'Price Each' + '</th>' + '<th>' + 'My Donation' + '</th>' + '<th>' + 'Amount' + '</th>';
- jQuery.each(prodName, function(index, value) {
- splitProductName = value;
- contents += "<tr>";
- contents += '<td>' + splitProductName;
- });
- jQuery.each(prodQty, function(index, value) {
- splitProductQuota = value;
- contents += '</td><td>' + splitProductQuota + '</td>' + '<td>' + '' + '</td>' + '<td>' + '' + '</td>' + '<td>' + '' + '</td>';
- contents += "</tr>";
- });
- contents += "</tr></table>";
- jQuery('#contentNeed').append(contents);
- }
- });
- jQuery.ajax({
- type: "POST",
- url: "http://ayambrand-com-my-v1.cloudaccess.host/index.php?option=com_echarity&format=raw&task=api.get_product_name",
- data: {dataArrayPost : Data},
- success: function(data){
- var a = JSON.parse(data);
- console.log(a);
- var prodName = a.productName;
- var splitProductName = "";
- var prodQty = a.quota;
- var splitProductQuota = "";
- var contents = '<table id="tableDonateDisplay" class="table table-hover">';
- contents += "<tr>";
- contents += '<th>' + 'Product' + '</th>' + '<th>' + 'Quantity Need' + '</th>' + '<th>' + 'Price Each' + '</th>' + '<th>' + 'My Donation' + '</th>' + '<th>' + 'Amount' + '</th></tr>';
- jQuery.each(prodName, function(index, value) {
- splitProductName = value;
- contents += "<tr>";
- contents += '<td>' + splitProductName;
- });
- jQuery.each(prodQty, function(index, value) {
- splitProductQuota = value;
- contents += '</td><td>' + splitProductQuota + '</td>' + '<td>' + '' + '</td>' + '<td>' + '' + '</td>' + '<td>' + '' + '</td>';
- contents += "</tr>";
- });
- contents += "</table>";
- jQuery('#contentNeed').append(contents);
- }
- });
Add Comment
Please, Sign In to add comment