Hello!
So I have now put my JS code in my grid: Ext Event --> cellClick and my console.log does get the icon clicked.
But now, how do you call a Delphi/Unigui component from JavaScript?
function cellclick(sender, td, cellIndex, record, tr, rowIndex, e, eOpts)
{
const noteIcons = document.querySelectorAll('.note'); //icons repeat themselves
const heartIcons = document.querySelectorAll('.heart');
for(noteIcon of noteIcons){
noteIcon.addEventListener('click', function(ev){
console.log('clicked on note');
//I want to call my form1 here, sth like
//Form1.Show;
})
}
for(heartIcon of heartIcons)
{
heartIcon.addEventListener('click', function(ev){
console.log('clicked on heart');
//I want to call my form2 here, sth like
//Form2.Show
})
}
Everything I've tried got me an "undefined"
Attached, a very simplified version of what I'm trying to do if it can help.
test_JS.zip