I have some JavaScript code to display values from a mysql database.
columns: [
{ text: 'Taal', datafield: 'taal', width: 50},
{ text: 'Titel', datafield: 'titel', width: 690 },
{ text: 'Website', datafield: 'sitenaam', width: 180 },
{ text: 'Ingezonden Door', datafield: 'gamer_int', width: 150 },
{ text: 'Datum', datafield: 'datum', width: 100 }
]
When we look at the first column named "Taal" the mysql database contains a value like eng_ico.png. What I want is something like this so the results display that image.
columns: [
{ text: 'Taal', datafield: "<img src=\"http://www.site.nl/images/" 'taal' "\">, width: 50},
{ text: 'Titel', datafield: 'titel', width: 690 },
{ text: 'Website', datafield: 'sitenaam', width: 180 },
{ text: 'Ingezonden Door', datafield: 'gamer_int', width: 150 },
{ text: 'Datum', datafield: 'datum', width: 100 }
]
I cannot get this right. Don't know what I am doing wrong. I tried the " . 'taal' . " like in php but also no success.
text: 'Taal', datafield: '<img src="http://www.site.nl/images/' + taal + '"/>', width: 50},?