I have a table where each row has a checkbox inside.
<input type="checkbox" onclick="handleClickOnReduce(this)" checked="">
The handler works like this:
function handleClickOnReduce (dom) {
console.log(dom)
if (dom.checked === 'true') {
console.log('checked')
}
if (dom.toString().includes('checked')) {
console.log('checked')
}
if (stompClient) {
var chatMessage = {
sender: 'userRequest',
content: [dom.parentElement.id],
type: 'REDUCE'
}
stompClient.send('/app/chat.sendMessage', {}, JSON.stringify(chatMessage))
}
}
You can see already what my question is about. I try to figure out if the checkbox of the caller of the handleClockOnReduce function is checked or unchecked.
Any idea?