Skip to content
Advertisement

How do I use specific table row data in ajax post

I’m trying to click on my pay button so as to update payment to a particular company. Below is my UI enter image description here

clicking on the pay button shows this enter image description here

I would like to display the name of the company the payment is going to and also be able to update the payment on the Total Remit column as well as reduce the debt.

I have been stuck on this page for a long time. Below is my code so far: query

JavaScript

code for table

JavaScript

Here is my ajax

JavaScript

code for remit.php*

JavaScript

Please, how do I fetch the company name and old remit from the table when I click on pay. I need your help!!

Advertisement

Answer

Instead

JavaScript

You could use function where u can pass id,name etc.

JavaScript

And from your html table row call this function like

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement