Thanks & Regards
Given all radio buttons in the group share the same name, let's call it myradio. Each radio button is associated with a unique value that identifies the choice your end-user made. Here is the interesting thing: only the value of the selected radio button is sent when the form is submitted to the server. So there is really no need to change the value of the remaining radio buttons.
In terms of usability, changing the values to true or false will not help you identify which one of those radio buttons were selected by the user.
If you just want to use the true or false states in your client-side program, you can just look if
myradio[i].checked is true or false.
For instance if the first radio button is checked then myradio.checked evaluates to true
while myradio.checked, myradio.checked , myradio.checked, myradio.checked all evalute to false
I hope the approach offered above suits your need.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)