I have the following javascript function:
function LoadDataTable(data) {
$('#table-labresult').bootstrapTable("load", data);
$table.bootstrapTable('refreshOptions', {
pageSize: 5,
columns: [{}, {}, {}, {}, {},
{
field: 'download',
title: 'Export',
align: 'center',
valign: 'middle',
clickToSelect: true,
width: '5%',
formatter: function (value, row, index) {
return '<span RecNo="' + row.RecNo + '" IsFileCompress="' + row.IsFileCompress + '" class="glyphicon glyphicon-download-alt downl"></span>';
}
}
]
});
}
What I would need is when I click on the span me even if it's a console.log (Recno);
How can I get that attribute when I click on the span?
probe with this:
onclick="clickdownload($this.RecNo)"
This gives me an error and tells me that clickdownload is not defined, and if it is defined