<input type=checkbox name=mm value=a onclick="checkItem('mm')"><br>
<input type=checkbox name=mm value=b onclick="checkItem('mm')"><br>
<input type=checkbox name=mm value=c onclick="checkItem('mm')"><br>
<input type=checkbox name=mm value=d onclick="checkItem('mm')"><br>
<input type=checkbox name=mm value=e onclick="checkItem('mm')"><br>
<input id="Text1" type="text" /><br>
<script language=Javascript>
function checkAll(e, itemName)
{
var aa = document.getElementsByName(itemName);
for (var i=0; i<aa.length; i++)
aa[i].checked = e.checked;
}
function checkItem(itemName)
{
Text1.value="";
var aa = document.getElementsByName(itemName);
for (var i=0; i<aa.length; i++)
{
if(aa[i].checked) Text1.value=Text1.value+aa[i].value
}
//if(e.checked) Text1.value=e.toString();
// var all = document.getElementsByName(allName)[0];
// if(!e.checked) all.checked = false;
// else
// {
// var aa = document.getElementsByName(e.name);
// for (var i=0; i<aa.length; i++)
// if(!aa[i].checked) return;
// all.checked = true;
// }
}
</script>