A
A
Alexander2018-03-22 10:27:43
JavaScript
Alexander, 2018-03-22 10:27:43

How to insert link via ajax in Jquery DataTables?

Hello!
There is a table that is loaded from a txt file with the following content:
{
"data": [
{
"id": "1",
"name": "Tiger Nixon",
"position": "System Architect",
"salary": " $320,800",
"start_date": "2011/04/25",
"office": "Edinburgh",
"extn": "5421"
},
]
}

If you insert something like this into any of the cells:

<a rel="nofollow" title="Подробнее" class="link" href="/" target="_blank">Подробнейй</a>

That displays a download error in general of the entire file.

I found on the official website a design similar to what I need. But I can't change it to fit my needs.
"url": "data.json",
"dataSrc": function ( json ) {
for ( var i=0, ien=json.data.length ; i json.data[i][0] = '

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Simonov, 2018-03-22
@SimasikS

I re-read it 3 times, I still didn’t understand anything, can you formulate the question somehow differently?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question