How to output urls as a link in a serverside column?

How to output urls as a link in a serverside column?

CapamaniaCapamania Posts: 233Questions: 81Answers: 5
edited October 2015 in Free community support

How can I output urls as a link in my serverside table? Links are rendered fine with the below columnDefs command, but how can I tell the table to use the urls (e.g. www.google.com) defined in the database table (mysql)? The link should then open the url in a new tab (normally with ... target="_blank" ...).

"columnDefs": [ 
    {   "targets": 9,
         "data": "Description",
         "render": function ( data, type, full, meta ) {
                 return '<a href="'+data+'"><i class="fa fa-file-pdf-o"></i></a>';
           }
     }]

Answers

This discussion has been closed.