Hi Adam, You are right, I do have 2 checkbox tags per iteration.
Sorry for the confusion. Doug -----Original Message----- From: Adam Hardy [mailto:[EMAIL PROTECTED]] Sent: 13 May 2002 17:35 To: Struts Users Mailing List Subject: Re: Using onclick within iterate tag I think Doug means he has 2 chkboxes per iteration. James Mitchell wrote: >I guess I need a bit more info to properly answer/stab-at your question. > >I assume that you know what the two checkboxes will always be. >-Why not just put the two on your jsp and not iterate over them. > >Or for a more generic approach, say you are writing your own custom taglib >like..... > ><myapp:conditionalCheckbox property="MyMapOfChecks"> > >or something like that........and this taglib would write out the html >necessary to make the second box (or more) disabled/enabled based on the 1st >value. > > > >Am I way off here??? > > > >JM > > > >>-----Original Message----- >>From: Doug Mclellan [mailto:[EMAIL PROTECTED]] >>Sent: Monday, May 13, 2002 11:56 AM >>To: Struts Users Mailing List >>Subject: RE: Using onclick within iterate tag >> >> >>Sorry, >> >>I meant the position within the iterator. Within the JSP there is two >>checkbox tags for each iteration and I need to only enable the second >>checkbox if the first has been checked. >> >>Doug >> >>-----Original Message----- >>From: James Mitchell [mailto:[EMAIL PROTECTED]] >>Sent: 13 May 2002 16:53 >>To: Struts Users Mailing List >>Subject: RE: Using onclick within iterate tag >> >> >>When you mean "position" do you mean "position within the iterator" or >>"position on the page"??? >> >>JM >> >> >> >>>-----Original Message----- >>>From: Doug Mclellan [mailto:[EMAIL PROTECTED]] >>>Sent: Monday, May 13, 2002 11:47 AM >>>To: Struts Users Mailing List >>>Subject: RE: Using onclick within iterate tag >>> >>> >>>Hi again, >>> >>>Many thanks James for helping us out, that works great. >>> >>>Apologies for not asking the question properly first time around. But >>> >>> >>is >> >> >>>it possible to also pass the position of the checkbox that has been >>>clicked so that the JavaScript function could be used to control other >>>checkbox tags within the iterate tag. >>> >>>Thanks again. >>> >>>Doug >>> >>>-----Original Message----- >>>From: James Mitchell [mailto:[EMAIL PROTECTED]] >>>Sent: 13 May 2002 16:10 >>>To: Struts Users Mailing List >>>Subject: RE: Using onclick within iterate tag >>> >>> >>>try this... >>> >>> >>><html:checkbox property="checkBox1" >>>onclick="JavaScript:handleCheckbox(this)"/>Check 1<br> >>><html:checkbox property="checkBox2" >>>onclick="JavaScript:handleCheckbox(this)"/>Check 2<br> >>><html:checkbox property="checkBox3" >>>onclick="JavaScript:handleCheckbox(this)"/>Check 3<br> >>><html:checkbox property="checkBox4" >>>onclick="JavaScript:handleCheckbox(this)"/>Check 4<br> >>> >>><SCRIPT LANGUAGE=javascript> >>><!-- >>>function handleCheckbox(obj){ >>> alert(obj.name); >>> >>>} >>>//--> >>></SCRIPT> >>> >>>JM >>> >>> >>> >>>>-----Original Message----- >>>>From: Doug Mclellan [mailto:[EMAIL PROTECTED]] >>>>Sent: Monday, May 13, 2002 10:31 AM >>>>To: [EMAIL PROTECTED] >>>>Subject: Using onclick within iterate tag >>>> >>>> >>>> >>>>Hi, >>>> >>>>I am using onclick event handler on a checkbox tag within a iterate >>>> >>>> >>>tag, >>> >>> >>>>since there is going to be multiple checkbox tags can someone please >>>>tell me how I can pass the identifier of the checkbox that has fired >>>> >>>> >>>the >>> >>> >>>>onclick event to the JavaScript function specified in the onclick. >>>> >>>>Thanks. >>>> >>>> Doug >>>> >>>>-- >>>>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]> >> >> >> >>-- >>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]> > > > > -- 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]>