How to toggle check boxes using JavaScript in Linux?
I was able to do the same in Windows with the below code....
function toggle_checkboxes(id)
{
if (!document.getElementById){ return; }
if (!document.getElementsByTagName){ return; }
var inputs = document.getElementById(id).getElementsByTagName("input");
for(var x=0; x < inputs.length; x++) {
if (inputs[x].type == 'checkbox'){
inputs[x].checked = !inputs[x].checked;
}
}
}
The same code is not working when I run it from a Linux machine.
When the button is clicked, nothing is happening :confused:
Please let me know as to how should I go about fixing this problem.
Thanks a lot for your time :)