I have two images (forward arrow and back arrow) on the canvas.
<script>
var ileri = new Image();
var geri = new Image();
ileri.src= "ileri.png";
geri.src = "geri.png";
var ilerigeri = 0;
GetFeedback = function(a){
context.drawImage(ileri,50,330);
context.drawImage(geri,300,330);
}
</script>
....
<div id="ccontainer">
<canvas id="myCanvas" width="600" height="400"></canvas>
</div>
I want to change the value of "ilerigeri" as 1, if ileri.png clicked. I want to change the value of "ilerigeri" as 2, if geri.png clicked. Can I use something like image.onclick or need to find coordinates of the point clicked?