2008-12-04

Firefox vs Internet Explorer

Another frustrating difference between the Firefox and Internet Explorer. A simple script in one of my pages selects all of the checkboxes in the page

function ChangeCheckBoxState(id, checkState)
{
var cb = document.getElementById(id);
if (cb != null)
cb.checked = checkState;
}

function ChangeAllCheckBoxStates(sender)
{
var checkState = sender.checked;
// Toggles through all of the checkboxes defined in the CheckBoxIDs array
// and updates their value to the checkState input parameter

alert('1');
if (cbCheckBoxList != null)
{
for (var i = 0; i < cbCheckBoxList.length; i++)
ChangeCheckBoxState(cbCheckBoxList[i], checkState);
}
}

here is a trigger


&lt input type="checkbox" id="cbSelectAll" onchange="ChangeAllCheckBoxStates(this)" &gt


So, here is the issue: while Firefox handles everything well , Internet Explorer needs me to check or uncheck the box and then to click on some other area on the scree

I Hate that , why ? isn't is the meaning of ONCHAGE event ??!@ huh ?

No comments: