I am pretty new in JavaScript and I have the following problem. Into a JSP page I have something like this:
<tbody>
<c:forEach items="${listaProgetti.lista}" var="progetto" varStatus="itemProgetto">
<tr id='<c:out value="${progetto.prgPro}" />'>
<td><input type="checkbox" class="checkbox" onchange="changeCheckbox()"></td>
.....................................................
.....................................................
.....................................................
</tr>
</c:forEach>
</tbody>
So a you can see clicking on the checkbox it is call this changeCheckbox() that actually is something very simple:
function changeCheckbox() {
alert("INTO changeCheckbox()");
var checkedRowList = new Array();
}
The problem is that into this function I have to retrieve what is the input object that fire the change event (I think something like the this)
How can I obtain the reference to the clicked checkbox in my previous changeCheckbox() function?