javascript - Get DataTables cell value to use in html link -


I thought it was a simple thing, but

using DataTables, I want to see the table The first column is hidden and use that cell data in the next column cell in an HTML image link.

HTML link using "user_id",

I have seen fnGetData () and MRF and I am still confused.

"code": " "," SDefaultContent ": '' lt; a href = 'somepage')," bstable "," bstable "," bstable ".php? Uid = '+" data cell from 0 + "" & gt; & Lt; img src = "picture / look png" width = "16" & gt; & Lt; / A & gt; '}

I always help myself with this trick:

bvisible on the wrong reason, because you will not have data in the line It is not sung at all, use sClass and Display: Any Set . This way the column is invisible to the user, but it is still there.

You can then use mRender to show a custom cell template:

  "AO column defects": [{A Target ": [0]," esclass ":" hidden "}, {" one targeting ": [1]," bishraceable ": incorrect," bstable ": incorrect," S class ":" center "," moderator ": Function (data, type, absolute) {return '& lt; a href =" http: //somepage.php? Uid = '+ full [0] +' "> click me  gt;   

Now the data is there, sortable and filtered.

Look at this and style.css

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -