Using URL from 1 column a link for another

Using URL from 1 column a link for another

ra1449ra1449 Posts: 7Questions: 3Answers: 0

I cannot figure out how to use a use from my link column as a hyperlink for my Name column

http://live.datatables.net/jucuneju/1/edit

Answers

  • ra1449ra1449 Posts: 7Questions: 3Answers: 0

    I meant to include the the Name column should display the actual name and not the url.

  • ra1449ra1449 Posts: 7Questions: 3Answers: 0

    figured it out

    $('#example').dataTable( {
      "columnDefs": [ {
        "targets": 0,
        "data": "download_link",
        "render": function ( data, type, row, meta ) {
          return '<a href="'+row[5]+'">'+data+'</a>';
        }
      } ]
    } );
    
This discussion has been closed.