That was fantastic! Thank you very much for that!
On Aug 19, 5:09 pm, Peter Edwards <p...@bjorsq.net> wrote: > Hi Chris, > > I have a working example at: > > http://jsbin.com/udota/ > > I've made the number of second inputs configurable so you can test it. > All you need now is a way of checking if they all add up to 100 if you > make them "user configurable" - I'll leave that up to you though! > > Peter > > on 19/08/2009 21:17 Chris Hall said:: > > > I have a good idea of what I want to accomplish, but I'm not sure how > > to do this with jquery. > > > If you can help give me an idea of what I must do or how to accomplish > > this I would GREATLY appreciate it! > > > I have a form that can has 4 radio buttons and two sets of text > > inputs. The first set always contains 6 inputs. the second set can > > contain between 1 and 5 inputs. > > > The goal is to allow the user to enter numbers in the two groups of > > inputs that total 100 (in both groups combined, not 100 for each > > group). > > > If the first radio button is selected, I fill the first group (6 text > > inputs) with 17, 17, 17, 17, 16, 16 (easy because the number of text > > inputs in this group do not change), and place all 0's in the second > > group of text inputs. > > > If the second radio button is selected, I must count the number of > > text inputs in this group and divide 100 between this group and place > > all 0's in the first group of text boxes (and the total must equal 100 > > so some boxes may have 1 more than others). > > > If the third radio button is selected, I must count all text inputs > > (first and second group) and divide 100 between this group (and the > > total must equal 100 so some boxes may have 1 more than others). > > > If the 4th radio button is selected I make all the text boxes enabled > > (otherwise they have been disabled) and the user can enter a custom > > configuration. > > > I've went at this several different ways, but none work well. > > > Thisbrainteaserhas me pulling out what little hair I have left. > > > If you can offer any help I would *GREATLY* appreciate it.