Own unique url for each entry
Own unique url for each entry
Petrrezen
Posts: 2Questions: 0Answers: 0
Help, I don't understand JS
in the demo table. Links work only on the first letters of the Position.
https://datatables.net/examples/basic_init/data_rendering.html
I want all links to be in JS. And to work for a unique job title, and not for a capital letter like on a demo
if (data[0] < '???') {
link = "http://cloudtables.com";
}
else if (data[0] < 'Support Engineer') {
link = "http://editor.datatables.net";
}
return '<a href="' + link + '">' + data + '</a>';
}
return data;
}
}, ```
This discussion has been closed.
Replies
That's just an arbitrary example. You can code this anyway you like!
Thank you very much for your help. Tables form table tennis ranking
You are welcome! I understand your problem though: Many of the examples are overly simplistic and have not much in common with real world situations. That can be confusing at times. So always bear in mind: It's just examples not templates
Apart from this I don't think you'll find many free solutions that have such a rich documentation, and such an active and supportive forum as Data Tables. A big thank you to @allan and his team for that.
Roland
Thanks Roland! It is people such as yourself and Kevin that make it such a pleasure to work in and with the open source community.
Allan