I'm having problems with calling function.
I have made function that loops through array and appends customer info in each row.
I would like to have onclick to call another function and pass one parameter.
aClanovi.forEach((oClan) => {
$("#table_body").append(
`<tr><td>${oClan.Ime}</td><td>${oClan.Prezime}</td><td>${oClan.Sport}</td><td>${oClan.Uloga}</td><td>${oClan.UlogaKraj}</td><td>${oClan.Clanarina}</td><td><a href='#editMemberModal' class='edit' data-bs-toggle='modal'><i class='material-icons' data-toggle='tooltip' title='Edit'></i></a></td><td><a href='' id='ObrisiClana' onclick='obrisiClana(oClan.OIB)'><i class='material-icons' title='Obrisi'></i></a></td></tr>`
);
});
const obrisiClana = (OIB) => {
console.log(OIB);
};
Main problem is within this
<a href='' id='ObrisiClana' onclick='obrisiClana(oClan.OIB)'><i class='material-icons' title='Obrisi'></i></a> and onclick.
All customer info's are showing, but I get error whenever I try to press delete button.
Error:
Uncaught ReferenceError: obrisiClana is not defined
onclick http://127.0.0.1:5500/index.html?:1```