Try this...
<HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> <form name=myForm method=post action="/myapp/doAction.do"> <INPUT type="checkbox" name=checkbox1>check 1<br> <INPUT type="checkbox" name=checkbox2>check 2<br> <INPUT type="checkbox" name=checkbox3>check 3<br> <INPUT type="checkbox" name=checkbox4>check 4<br> <INPUT type="checkbox" name=checkbox5>check 5<br> <INPUT type="checkbox" name=checkbox6>check 6<br> </form> <SCRIPT LANGUAGE=javascript> <!-- function SetChecked(val) { dml=document.forms["myForm"]; len = dml.elements.length; var i=0; for( i = 0 ; i < len ; i++) { if (dml.elements[i].type=='checkbox') { if ( val == 'off' ){ dml.elements[i].checked=false; }else if ( val == 'invert' ) { dml.elements[i].checked = (!dml.elements[i].checked); }else{ dml.elements[i].checked=true; } } } } //--> </SCRIPT> <P> </P> <a href="javascript:SetChecked('on')">Check All</a>/ <a href="javascript:SetChecked('off')">Clear All</a>/ <a href="javascript:SetChecked('invert')">Invert</a> </BODY> </HTML> James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the "Open Minded Developer Network" http://www.open-tools.org/struts-atlanta > -----Original Message----- > From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 15, 2002 9:44 AM > To: 'Struts Users Mailing List' > Subject: RE: Html:checkbox issue > > > This is just a shot in the dark, but could you specify the > onclick attribute > of the checkbox to run some javascript? When clicked, you could swap the > checkbox properties back and forth between checked and not checked. Does > anyone else think something like this would work well? It's just > an idea... > > ~ Keith > http://www.buffalo.edu/~kkamholz > > > > -----Original Message----- > From: Toni Nehme [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 15, 2002 9:36 AM > To: [EMAIL PROTECTED] > Subject: Html:checkbox issue > > > > Hi All, > > > I have checkbox displayed in a table and I am trying to create a > a checkbox outside the table to check All the checkboxes inside the table. > > My table is using the logic:iterate tag and displays the table. > > Please, let me know if anybody knows how to solve this. > > > Thanks. > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>