I have the following code, and it works in Firefox and IE that I tested so far.
It does not work in Safari though. Any thoughts?
I placed the code in the <head> section of my HTML. It basically toggles checkboxes.
Code:
<script language="javascript">
function toggle(source) {
checkboxes = document.getElementsByName('items_to_add[]');
for each(var checkbox in checkboxes)
checkbox.checked = source.checked;
}
</script>