Arie Bregman

Linux And Stuff

Tag: ajax

jQuery Datatable Ajax: Change cell’s HTML after data is processed

The Problem

You generated a table using jQuery Datatable without loading the page, using Ajax. You wish to change the HTML of cells in a certain column after the data is processed. How to do it?

For the sake of this example, we’ll say we want to switch the data in the first column of the table into a hyperlink.

Continue reading

Ajax Datatable: changing row color based on the data

We have the following table which is populated with data, using Ajax

Now, let’s say you want to color the table rows, based on the second column status after, the table is already filled with data:

  • UNSTABLE -> Yellow
  • SUCCESS -> Green
  • Failure -> Red

Continue reading

© 2017 Arie Bregman

Theme by Anders NorenUp ↑