You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by as as <sa...@yahoo.com> on 2004/04/17 05:25:06 UTC

javascript -check all

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

Re: javascript -check all

Posted by Andrey Rogov <an...@ukrpost.net>.

function checkAll()
{
    for ( var i=0; i<document.forms[0].elements.length; i++ )
    {
        if ( document.forms[0].elements[i].type == "checkbox" )
        {
            document.forms[0].elements[i].checked=true ;
        }
    }
    return false;
}

aa> Hi
aa> Probably slightly off topic
aa> 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
aa> implemented this code..
aa> Thanks much in advance,
aa> sam

                
aa> ---------------------------------
aa> Do you Yahoo!?
aa> Yahoo! Tax Center - File online by April 15th



-- 
Best regards,
 Andrey                            mailto:andrey.rogov@ukrpost.net


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org