solve the php problem

Discussion in 'PHP' started by getz, Feb 22, 2008.

  1. #1
    I have a php page having 2 groups of radio buttons(suppose group1,group2). In both groups there are 2 radio buttons ie, yes & no . 'no' button is checked by default in both groups.I want when a user checks yes button of any group (suppose group1), corresponding yes button of other group (group2)get checked automatically & vice versa.(It will happen also for 'no' buttons if user change his/her mind from yes to no.)

    Thanks in advance.
     
    getz, Feb 22, 2008 IP
  2. DomainCo.US

    DomainCo.US Well-Known Member

    Messages:
    2,124
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    100
    #2
    can't this be done by javascript?
     
    DomainCo.US, Feb 22, 2008 IP
  3. nastynappy

    nastynappy Banned

    Messages:
    499
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #3
    write the code here.
    i am sure i can help you with it.
     
    nastynappy, Feb 22, 2008 IP
  4. zerxer

    zerxer Peon

    Messages:
    368
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #4
    What's the point in even having 2 separate groups if Yes in the one automatically means Yes in the other and the same with No? Why don't you just make it 1 group and if the groups are titled "Do you like blue?" and "Do you like the color of the sky?", change it to one group by changing the question to "Do you like the blue, the color of the sky?"

    You could do it with JavaScript, yes, but I don't understand why you'd have two separate groups when they both have to be the same answer.
     
    zerxer, Feb 22, 2008 IP
  5. nastynappy

    nastynappy Banned

    Messages:
    499
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #5
    no no , what he is trying to do is:
    suppose you want to buy a car..
    you selected company name " Toyota "
    now what he wants is, show All the models of cars made by "Toyota" see..
    like when you select "Toyota" , it should show like Toyota Supra , Toyota Corolla etc..

    and yeah, javascript would be fine for it, but the problem is, i cant understand javascript, so i cant help him with it..
     
    nastynappy, Feb 26, 2008 IP