FelixHenninger / lab.js

Online research made easy
https://lab.js.org/
Other
239 stars 107 forks source link

Display of images #212

Open PaulWWarren opened 11 months ago

PaulWWarren commented 11 months ago

What would you like or expect to see?

The attached experiment has only one page. This page has four image files associated with it, as can be seen from using the tab to the right of 'scripts'. In the 'scripts' tab, this.parameters.artwork is randomly associated with one of the four file names.

Then in the contents tab it should show: (1) the randomly chosen filename (2) the randomly chosen image (3) an unchanging image

What is currently happening?

(1) above works fine. (2) and (3) do not display - just show the symbol for a broken image link.

Please describe the steps needed to reproduce this phenomenon

Just load the json into the builder.

Finally, please tell us which browser you're using (and the version thereof)

Chrome Version 115.0.5790.111 (Official Build) (64-bit) randomImage.zip

PaulWWarren commented 11 months ago

I seem to have solved my problem. It would appear that in, e.g. "<img src=${ this.files[this.parameters.artwork] } />" there needs to be a space between the final curly bracket and the forward slash.