Code to get image file name in table on Mouse Click

What is the code to get the file name of an image in a table (or repeater) when the row in the table (or repeater) is Mouse Clicked or Mouse over?.
When I get the filename, I will display a larger size of the image in a hidden gallery box.

You would use one of:

In the event argument you should have access to the data of the selected row/cell. See the examples in the above documents…

Thanks Dor for the tip. Your pointing me in the right direction for sure. I can get an image “src” from a Mouseclick event when I click in an Image Element. But when I click on a Table with an Image inside I cant get the image “src” for that element, even when I select “Clicking Selects Cells”. It appears that I could use a repeater instead of a table to display my images and data however a repeater is not like a table and will not work for my application (I want access to all 700 paintings and a repeater would make a LONG page. So I need to use a table. Do you have any additional things I can try top capture an image scr from a table with text fields and images on each row?

Hi,

$w("#myTable").onRowSelect( (event, $w) => {
  let rowData = event.rowData;    // {"fName": "John", "lName": "Doe"}
} );
  • “rowData” should contain all data displayed in the selected row and you would extract the image src via something like: “rowData.imageField.src”
    Good luck!

Hi,
Im trying to get the data from a selected row from a table to be placed inside a repeater is that possible? I would appreciate it if you could post a sample code for that.

Thank you.

Rowan, I was not able to get the code to work to extract the image src from a mouse click in a table. Java Script is still a bit confusing for me at this time. If it was Visual Basic Im sure I could do what I wanted, but not with Js. If you get it to work I would appreciate the sample code and I would even be willing to pay for it.
WIX has the code for what we want, I wish they would share. The see the example, create a collection (database) and populate images in the column (property type image) there and then hover over that image you will see what we want. The hover creates a large size of the image to be displayed in a box with the file name and the size in pixels.