How to make condition button on column.render?
How to make condition button on column.render?

This is my php code wich i want to change to javascript using datatable
and this is my code javascript using datatable
I want make condition button like on php..
Please Help me..
Thanks
This discussion has been closed.
Replies
This example should help, it's doing just that.
Colin
@colin I just confuse how to get data from database then use it to make condition like on last <td> on php. I want get data from database then use it on column.render.
on your example, the condition happen when the button clicked.
But, i want the condition happen when i'm not doing anything. just check from database.
if there's no data, the button will set btn-danger else set btn-success.
Please help i'm newbie.
Thanks