Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82145

Reformat Column To Hyperlink from JSON Web Service

$
0
0
I have a simple data table populated via a JSON feed. One of the columns has a partial path

"\wells\Arizona\EastCarrizo\E145O.pdf"

What I need to do is rather than just dump it into the table as I am here (which works fine)

$('#example').dataTable({
"bProcessing": true,
"sAjaxSource": '/api/UraniumLogs?district=none',
"sAjaxDataProp": "",
"aoColumns": [
{ "mDataProp": "HOLE_NUM" },
{ "mDataProp": "STATE" },
{ "mDataProp": "DISTRICT" },
{ "mDataProp": "CLAIM" },
{ "mDataProp": "COLLAR_ELEVATION" },
{ "mDataProp": "DEPTH" },
{ "mDataProp": "FILENAME" },



]
});

but actually wrap and append some hyperlink goodness to the FILENAME column and then inject it into the table. Something like

"http://hostname/" + FILENAME;

I have read a bunch of stuff about later versions of DataTables recognizing HTML hyperlinks and using fnRenderer (which is apparently deprecated) but am stuck.

Thanks in advance.

Viewing all articles
Browse latest Browse all 82145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>