Este codigo me funciona sin problemas con Ie pero con mozilla no funciona...... cual es el problema ya he visto todo el foro pero aun no encuentro la solucion....
Tengo varios Checkbox con el mismo nombre, pero el value es distinto para poder diferenciarlos...
<input type="checkbox" id="selectionCheck" value="id">
</input>
entonces cuando hago submit llama a GetSelectedItemsCount() y me entrega el numero checkbox que estan selecionados... si no hay ninguno me arroja 0.
Pero esto no me funciona con mozilla.
Código PHP:
function GetSelectedItemsCount()
{
if (typeof(document.Form.selectionCheck) != "undefined")
return Sel_GetSelectedItemsCount(document.Form.selectionCheck);
else
return 0;
}
function Sel_GetSelectedItemsCount(itemlist)
{
if (typeof(itemlist) == "undefined")
{
return 0;
}
cant = itemlist.length;
if(!cant)
{
if (itemlist.checked)
return 1;
}
else
{
count = 0;
for(gsici = 0; gsici < cant; gsici++)
{
if (itemlist[gsici].checked)
count++;
}
return count;
}
}