href into a colums
href into a colums

Hello,
I've tested "upload" example.
I would like to know if it's possible in table not to see the image, but a link to open the file. Ha ve vou ever tested it ?
Thanks a lot !
This discussion has been closed.
Replies
After some researches :
I found this :
I've tried to adapt it for a simple upload :
but I don't find my mistake... Have you an idea ?
I remember the goal : To have an icon with the link to the file insteed of the image.
Thanks for your help !
What happens? What do you see? Do you get errors?
Please post a link to your page or a test case showing the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Here is when it works like in the example :
--> workin version
What I would like is not showing the picture but only have the link to it like this :

Here is my complete js (working version)
What happens with this code?
I'm not sure what the HTML will look like which is why we ask for a link to your page to see. Maybe right click on the cell and inspect it to see what HTML is generated and adjust as needed.
Kevin
Nothing happens with this code, it's wrong.
I've found something better :
{
data: "files.system_path",
"render": function ( data, type, row, meta ) {
fichier = 'file:///';
return '<a href="'+data+'">Lien du fichier</a>';
}
}
But, when I click on the link, I'm going to the page
c:/wamp64/www/test/upload/29.pdf
and I need to go to
file:///c:/wamp64/www/test/upload/29.pdf
Do you know how to add 'file:///' behind data ?
Thanks !
PS : I would like to show my page, but using live.datatables or js fiddle , how do you add your php files ?
Found !!
And then, your pdf document open in firefox !
Thanks for posting back - good to hear you've got it working.
Allan