You need to sign in to do that
Don't have an account?
Using image as link
I'm trying to use a image inside a table, and when I click on it, should call a function an pass a parameter. But when I use the tag<img> inside the tag<a> the parameter is set as null.
Could anyone help me?
Could anyone help me?
!--- comp <a data-ex="{!contSubIndex}" onclick="{!c.expandTVSubTable}"> <img src="{!$Resource.v360IconeMais}"/> </a>Controller
var index = event.target.getAttribute('data-ex'); alert(index);
Here the event soruce is image actually.
Change your code to like below to get the value of data-ex