Using ajax in advanced module
I am working in a advanced module which shows the list of registered user. If an user is newly registered his registration is need to be approved by admin.
I am having a status field in table by default it is 0. In model list_items() function i have a query which retrieves values from table. My table headers are "name, email, skill and status" right now am getting the values but in status i have to check the condition if status is 0 text has to be two anchor tag with text "Approve" and "Reject", so when i click "Approve" it needs to make a ajax request and email has to be sent the registered user and my status has to show "approved".. How to do this?