Selecting radio button when other button selected

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
abcd
Forum Newbie
Posts: 2
Joined: Fri Feb 22, 2008 9:13 am

Selecting radio button when other button selected

Post by abcd »

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.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
Last edited by RobertGonzalez on Fri Feb 22, 2008 11:34 am, edited 1 time in total.
Reason: Obscure title renamed to something more meaningful
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: plz solve the problem

Post by Zoxive »

This has nothing to do with php. This would require Javascript.
abcd
Forum Newbie
Posts: 2
Joined: Fri Feb 22, 2008 9:13 am

Re: plz solve the problem

Post by abcd »

can I use javascript within php?
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Re: plz solve the problem

Post by liljester »

the short answer is no.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: plz solve the problem

Post by Jonah Bron »

One question, and that is if you only have "yes" and "no", why not just use checkboxes?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: Selecting radio button when other button selected

Post by RobertGonzalez »

Moved to Client Side.

Renamed the thread to remove obscure title and replace with something more meaningful.
Post Reply