Kod:
<!-- Original: Mike Elkins (m_c_elkins@hotmail.com) -->
<!-- Begin
function selectivecheck(field, myselection)
{
var fieldid;
var pos;
var criteria;
var strng;
strng = myselection.value;
for (i=0; i<field.length; i++)
{
if (strng=="all")
{
field[i].checked = true;
}
else
{
fieldid = field[i].id;
pos = strng.substring(0,1);
criteria = strng.substring(1,2); //this gets the information we want to evaluate
if (fieldid.substring(pos,pos+1)==criteria)
{
field[i].checked = true;
}
else
{
field[i].checked = false; //you could leave this out if you don't want to clear the check boxes
}
}
}
}
// End -->
</script>