Adding URL's to a column's results
Adding URL's to a column's results
I'm pulling data from json and I'd like to wrap values in a particular column in value456. with "value456" being copied and pasted into the url.
for example:
my table looks like so:
[code]
link
www.yahoo.com
description
[/code]
but i'd like to be able to produce:
[code]
link
www.yahoo.com
description
[/code]
with the being generated from it's corresponding value.
any ideas? i can alter the json, too, if that helps. it is setup in the datatables way, currently. sTitles for the first object and the values for the following objects.
thanks,
orange
for example:
my table looks like so:
[code]
link
www.yahoo.com
description
[/code]
but i'd like to be able to produce:
[code]
link
www.yahoo.com
description
[/code]
with the being generated from it's corresponding value.
any ideas? i can alter the json, too, if that helps. it is setup in the datatables way, currently. sTitles for the first object and the values for the following objects.
thanks,
orange
This discussion has been closed.
Replies
Two quick options:
1. Just have whatever is creating the JSON put the HTML in place for you (you can have HTML in the JSON).
2. If this isn't an option, or you don't like it, use fnRender:
http://datatables.net/usage/columns#fnRender
http://datatables.net/examples/advanced_init/column_render.html
Allan