You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This is how I did it with Jquery - not sure if there is a better way.

 $( document ).ready(function() {


$('#worksheetsgen > tbody  > tr').each(function() {

var filename = $('td.column_worksheetattachment').text();
var foldername = $('td.column_id').text();

$('td.column_worksheetattachment').replaceWith ('<img style="width:100px;" src="/idtapps/web/client/app/assessments/1/form/download/worksheet/' +foldername + '/' + filename + '.">');


//end worksheetsgenlist loop
});


//end doc ready
});

Where:

  • #worksheetsgen is the id of my datalist
  • td.column_worksheetattachment holds the image upload filename
  • td.column_id has the row id column
  • No labels