I am using a display table in my jsp page.. It is like...
<display:table name="${MyList}" pagesize="10" requestURI="" sort="page">
<display:setProperty name="paging.banner.placement" value="bottom" />
<display:column property="Language" sortable="true" title="Name" />
<display:column title="Read">
<input type="checkbox" name="ReadOnly" id="1" onChange="toggle(this);">
</display:column>
<display:column title="Write">
<input type="checkbox" name="Write" id="2" onChange="toggle(this);">
</display:column>
<display:column title="Speak">
<input type="checkbox" name="Speak" id="3" onChange="toggle(this);">
</display:column>
</display:table>
It was working fine. And then i need to make only one combo box to be selected in each row. For that i used the javaScript function
<script type="text/javascript">
function toggle(chkBox) {
alert("chk----"+chkBox);
checkboxes = document.getElementsByTagName("input");
alert("hai-----"+checkboxes);
var isChecked = chkBox.checked;
for (var i = 0; i < checkboxes.length; i++) {
checkboxes[i].checked = false;
}
if (isChecked) {
chkBox.checked = true;
}
}
</script>
But now i can only select one of the whole checkboxes in myList. I want to select only one combobox from each row..
Firstlt i must say.. I dont need the radio button there.
Is it possible? and how can i make my code to achieve it???