- var div_element = '<div id="' + bt_id + '.' + prop_id + '">';
- var hidden_element = '<input type="hidden" name="invoice_ids.' + bt_id + '[]" value="' + prop_id + '">' + prop_invnumber;
- var link_element = '<a href=# onclick="delete_invoice(' + bt_id + ',' + prop_id + ');">x</a>';
- var new_html = div_element + hidden_element + link_element + '</div>';
- invoices.innerHTML += new_html;
+
+ $.ajax({
+ url: 'controller.pl?action=BankTransaction/ajax_payment_suggestion&bt_id=' + bt_id + '&prop_id=' + prop_id,
+ success: function(data) {
+ invoices.innerHTML += data.html;
+ }
+ });