>Well, I wondered because checkbox values could be catched at the server side in the ASP scripts. Anyway, if you want that in such form, loop through all controls of the form. Array in Java Script have count property. In the loop check if control's name start from 'Message', if yes, get checked status and put into result string the name, if required.
The reason to do it at the page level is because that page is not firing anything at the server but it is updating a value from another page.
This is what I came up with:
function MessageMark(theForm)
{
lcField=""
lcValue=""
lcMessageMark=""
for (i = 0; i < theForm.length; i++)
{
lcField=theForm.elements[i].name
lcValue=lcField.substring(7,13)
floatValue=parseFloat(lcValue)
if (!isNaN(floatValue))
{
if (theForm.elements[i].checked==true)
{
lcMessageMark=lcMessageMark+lcValue+","
}
}
}
if (lcMessageMark.length>0)
{
lcMessageMark=lcMessageMark.substring(0,lcMessageMark.length-1)
}
return lcMessageMark
}