Your issue comes from assigning the same id twice. This is a non-supported behavior and your page won't validate.
And are you sure you don't want radio boxes? Can a valid entry really be both AM and PM? If you go with radios, a common name will link them for selection purposes, and be sure to give unique ids. If you use radios, there was a great thread about this here a week ago, http://groups.google.com/group/prototype-scriptaculous/browse_thread/thr ead/fce18f49466cdabb -----Original Message----- From: prototype-scriptaculous@googlegroups.com [mailto:prototype-scriptacul...@googlegroups.com] On Behalf Of Andy_D Sent: Thursday, April 09, 2009 11:25 AM To: Prototype & script.aculo.us Subject: [Proto-Scripty] Checkbox values for Beginners Newbie here with some very rusty JS experience just getting my head round the whole Prototype (1.5.0_rc0) thing on IE7 with Lotus Notes as the backend AND picking up where a contractor left off! I have simple form with two boxes - AM and PM <input type="checkbox" name="txtStartAMPM" value="am" checked id="txtStartAMPM">am <input type="checkbox" name="txtStartAMPM" value="pm" checked id="txtStartAMPM">pm and a submission routine that needs to get the value of these to put in a URL string "&txtStartAMPM=am,pm" Obviously if the box is unchecked we don't need the value. I have trawled through many sites this afternoon but have had no luck in finding one that details how to return the values of the boxes. I got as far as var startAMPM = $('txtStartAMPM').pluck('checked'); and got stuck. Could someone give a newb a hand please? Many thanks in advance Andy_D --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---