jmurch
Jun 17th, 2008, 02:09 AM
I have a form element that is a radio and mutually exclusive of 4 others. All 4 have the name 'radio'. I am using JS to calculate the value of the selected radio as well as other elements on the form.
When the form is submitted I need to know which one of the 4 radios was selected so that I can insert the proper info into a database. Since they all have the same name to allow them to be mutually exclusive the post just has the one name. I have been comparing the value 'radio' with the value of other variables on the page to determine which of the four was selected.
This works great until I have radios with the same values. Is there another way to identify radios while still leaving them mutually exclusive?
When the form is submitted I need to know which one of the 4 radios was selected so that I can insert the proper info into a database. Since they all have the same name to allow them to be mutually exclusive the post just has the one name. I have been comparing the value 'radio' with the value of other variables on the page to determine which of the four was selected.
This works great until I have radios with the same values. Is there another way to identify radios while still leaving them mutually exclusive?