onclick and ontouchstart


the following code (based on code from https://www.w3schools.com) works all right on computers: users click a row in a listbox, and its related image shows up.
But on iPads and similar touchscreen devices, when users tap a row in the box, nothing happens.

So, in the snippet below, beside “onclick” I added also “onthouchstart”, but pictures still do not show up.
On the other end, tapping buttons (see button class=“btnArrow” onclick, below) works OK.

Googling around I got a tip about using event.stopPropagation();
so I added it to the script below, but to no avail.

Any suggestion how to solve the problem?
Any recommendation appreciated. Thank you.

Pict 1
Pict 2


From what I see on my own iPad is that both onClick and onTouchStart work just fine.

So the issue would seem to be elsewhere in the code. The main difference between iOS and other browsers is that certain operations cannot take place if they are not in the event where the user tapped the device.

I think the cause of issue is my using ; in fact, using the issue disappears.
Yet I use because, since the number of items would overflow the screen-area, I though of keeping them in “listbox” of fixed height. But is seems I’ll have to go back and use .

Pict 1 Pict 2 ......

Thank you for answering.