LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   radio button: how to detect which was last checked in a multi group of buttons (https://www.linuxquestions.org/questions/programming-9/radio-button-how-to-detect-which-was-last-checked-in-a-multi-group-of-buttons-583320/)

rblampain 09-09-2007 02:44 AM

radio button: how to detect which was last checked in a multi group of buttons
 
I am a casual Javascript user.

I have an HTML script comprising a variable number of groups of radio buttons but clicking one button in one group may invalidate buttons selected in one or more other groups in which de-selecting some buttons will then become necessary through a Javascript script.

The concept is to readjust through the "onChange" or the "onClick" event all these buttons according to the last selected by the user until the user is satisfied with the selection and "submits".

Is it necessary to have two arrays, one showing the current state of all the radio buttons and the other showing the state of these buttons before the last "click" so the script can make the necessary changes?

Or is there a simpler solution?

Thank you for your help.

jlinkels 09-10-2007 12:49 PM

Check this. If it doesn't provide a exact answer, you might get an idea how to solve your problem

www.javascripttoolbox.com

jlinkels

rblampain 09-11-2007 08:42 AM

Thank you for the tip, I'll have a look at the link.


All times are GMT -5. The time now is 08:52 AM.