How do I view uploaded images in a layer?

How do I view uploaded images in a layer?

irkrexxirkrexx Posts: 6Questions: 1Answers: 1

Hey. I use the File upload(Many) example and want to modify it so that when I click on a row below the table, the loaded images appear.
I created a layer with id="form" and an event handler:
$('#journal tbody').on( 'click', 'tr', function () {
var oData = myTable.row( this ).data();
$('#form').html(???);}

But I can't figure out which function to use to display the images. Help please...

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,642Questions: 1Answers: 10,093 Site admin

    click on a row below the table

    I don't quite understand that point. Could you show me an image of what you are looking for please?

    Allan

  • irkrexxirkrexx Posts: 6Questions: 1Answers: 1

  • irkrexxirkrexx Posts: 6Questions: 1Answers: 1

    Sorry for my little English

  • irkrexxirkrexx Posts: 6Questions: 1Answers: 1
    Answer ✓

    I figured it out a bit and used the following function to output the downloaded images:
    (Perhaps there is a more elegant solution.)

    $('#example tbody').on( 'click', 'tr', function () {
    var oData = table.row( this ).data();
    var list = document.getElementById('form');
    var hList = '<img src="../..';
    var fList = ' " width="189" alt=" " >';
    for (var i = 0; i < oData.files.length; i++) {
    list.innerHTML += hList+editor.file('files', oData.files[i].id).web_path + fList};
    });

This discussion has been closed.