How to add a "Report Broken Link" Button?

How to add a "Report Broken Link" Button?

djeromedjerome Posts: 1Questions: 1Answers: 0

Hi all,

First of all I am quite a beginner, I have some experience with html and css and very basic php.

I am using datatable for a test site I am making in locahost.

The data method I am using is AJAX:
http://www.datatables.net/examples/data_sources/ajax.html

So I call it in my index.php and have my data in array.php.
Works Great!

But now I would like to integrate a "Report Broken Link" Button

For reference, my data (array.php) looks like this:

{
  "data": [

[
      "<a href='http://www.biglawfirmllc.com/'>Big Law Firm LLC</a>",
      "Thomas Cook",
      "Lawyer"
],      

  ]
}

In this row, the link is for a fictional "Big Law Firm LLC" and I would like to add a "report broken link" button next to it.

How should I go about doing this?
Any particular guide or simplistic way to do it for a beginner?

Thank you

Answers

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin

    Two options:

    1. Modify the JSON that is created by whatever you are using on the server to create it to add the link.
    2. Use columns.data set to null and columns.render to produce the link that you want to display.

    Allan

This discussion has been closed.