Create cell with hyperlink to "POST" data
Create cell with hyperlink to "POST" data

Hello everyone,
saw this old thread where an user explain how to create hyperlink in a cell
https://www.datatables.net/forums/discussion/25111/hyperlink-in-td
But what if i need to create an hyperlink withoud passing sensitive informations?
I would like to use the POST method using that link.
i have this function that return a link to the dataTable cell:
function createLink(baseURL, cname, id) {
var link = document.createElement('a');
link.href = baseURL + '?action=details&companyID=' + id + '&fromMain=false';
link.appendChild(document.createTextNode(cname));
return link.outerHTML;
}
What can be done to create a function that return a link to the cell and pass the sensitive informations using a POST method? Of course the link should point to the correct page the baseURL + the sensitive informations ('?action=details&companyID=' + id + '&fromMain=false')
Thank you in advance.
Answers
You can use
columns.render
to render the HTML but the mechanism for sending a POST request is outside of Datatables. Maybe this SO thread will give you some ideas.Kevin
Thank you very much for the kind reply.