Re: Multiple radio button groups

2006-09-27 Thread yamilka vallejo ramos
Hi, look I work with that and the way that I do it, its asking in the actionForm by the value of the radioButton I mean: In my case in the JSP I put this: And in the ActionForm: if(gestionarEdicionFarmacoMedicacionForm. getAnestesico().matches("farmacoA")){ ... } thats because I just have

Re: Multiple radio button groups

2006-09-26 Thread Chris Pratt
I think I see the problem, it was with my example, it should have been: var value = radioValue(document.formName.elements["apprEntry[0].primary_or_adjunct"]); where "formName" is the value of the name attribute of the form tag. (*Chris*) On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]>

Re: Multiple radio button groups

2006-09-26 Thread Uday Chandra Karrothi
Thanks Chris, The request.getParameter works. I think i am going to go with that. the javascript was throwing soem errors. I will figure that out later. Thanks for the help once again. Later Uday Chandra On 9/26/06, Chris Pratt <[EMAIL PROTECTED]> wrote: Wow, those are some ugly field names,

Re: Multiple radio button groups

2006-09-26 Thread Chris Pratt
Wow, those are some ugly field names, but you should be able to access it from either. In JavaScript I would probably use a helper function something like: function radioValue (fld) { for(var i = 0; i < fld.length;i++) { if(fld[i].checked) { return fld[i].value; } } return fld[0].v

Re: Multiple radio button groups

2006-09-26 Thread Uday Chandra Karrothi
Thanks Chris for the response. But here is the problem. .. Pri. Adj. .. The resultant html code is ... Pri. Adj. ... Pri. Adj. ... You are right to say that the all the radio with the same name are conside

Re: Multiple radio button groups

2006-09-26 Thread Chris Pratt
All the radio buttons (or checkboxes) with the same name are in a "button group". The value of the selected radio button (or list of selected checkboxes) is returned from request.getParameter() (or request.getParameterValues()). (*Chris*) On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]> wr