Thats an idea - use a class as the selector. Maybe I can get that working generically,
I will give it a try. On Mar 30, 2:34 pm, Chris Sansom <ch...@highway57.co.uk> wrote: > At 04:20 -0700 30/3/09, simon.murgatr...@googlemail.com wrote: > > >The problem is it only registers the call back on the first of the > >radio boxes. If I change the id on each input statement so each uses a > >differenet name, I can register three callbacks. But I want the radio > >boxes to operate as a set, with only a single possible value. > > >I suspect I am going about this in the wrong way. What is the correct > >way to do this so that I get told as the user selects a different > >option? > > I've never used Form.Element.EventObserver, but I can tell you > straight away what's wrong here: although your radios can (and indeed > should) have the same /name/ to operate as a set in the form data, > they /must/ have separate IDs in the HTML - the page won't validate > if they have the same id (no two elements can share an id). They can, > however, share the same class, so I suggest doing something like this: > > <input type="radio" id="rbEncAll" class="rbEncryption" name="rbEncryption" > value="All" >All<br/> > <input type="radio" id="rbEncYes" class="rbEncryption" name="rbEncryption" > value="Yes">Encrypted<br/> > <input type="radio" id="rbEncNo" class="rbEncryption" name="rbEncryption" > value="No">Unencrypted<br/> > > But having, as I say, not used this call, I'm not sure how you > register the callback. Someone else will have to advise on the > detail, but you might be able to do something with: > > $$('input.rbEncryption').each (function... > > -- > Cheers... Chris > Highway 57 Web Development --http://highway57.co.uk/ > > Everything Is More Difficult Than It Appears > -- Adam C Engst --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---