function checkAll(formName,field) {

        var formtest = "document." + formName +"."+field;
        var formObj    = eval("document." + formName +"."+field);
        var length = formObj.length;
        if(length > 1){

            for (i = 0; i < length ; i++)
                   formObj[i].checked = true ;
        }
        else{
                formObj.checked = true ;
                
        }
                
}

u can use the above javascript function where form is the name of ur html form and 
filed is the name of ur chexbox

On Sat, 17 Apr 2004 as as wrote :
>Hi
>Probably slightly off topic
>but i ahve a jsp using struts that has a table with rows.each row has a check box.I 
>have a checkbox at the top of the table, clicking which, i want all below checkboxes 
>to be checked..has anyone implemented this code..
>Thanks much in advance,
>sam
>
>
>---------------------------------
>Do you Yahoo!?
>Yahoo! Tax Center - File online by April 15th

Reply via email to