Click here to Skip to main content
15,885,020 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
i have radio button like

XML
<div id="testhere">
    <input type="radio" name="ahahah" /><div>aaaaaa</div>
    <input type="radio" name="ahahah" /><div>bbbbbb</div>
    <input type="radio" name="ahahah" /><div>cccccc</div>
    <input type="radio" name="ahahah" /><div>dddddd</div>
    <input type="radio" name="ahahah" /><div>eeeeee</div>
    <input type="radio" name="ahahah" /><div>ffffff</div>
</div>
<div id="testhere1">
    <input type="radio" name="ahahah" /><div>gggggg</div>
    <input type="radio" name="ahahah" /><div>hhhhhh</div>
    <input type="radio" name="ahahah" /><div>iiiiii</div>
    <input type="radio" name="ahahah" /><div>jjjjjj</div>
    <input type="radio" name="ahahah" /><div>kkkkkk</div>
    <input type="radio" name="ahahah" /><div>llllll</div>
</div>




i want to select radio button from both division ...

i.e. single radio button from each division...

how to do that..also i use form only once

I want to do this , because i want one value from each division..

or how u can suggest
Posted
v2
Comments
Member 10434230 18-Dec-13 4:37am    
Can you please elaborate on your requirement, what do you mean by "Single radio button from each division"?
Do you want 1st occurrence of radio button from both div's and then 2nd, 3rd...?
An@nd Rajan10 18-Dec-13 5:01am    
use checkbox

1 solution

Just change the name attribute value.
XML
<div id="testhere">
    <input type="radio" name="ahahah" /><div>aaaaaa</div>
    <input type="radio" name="ahahah" /><div>bbbbbb</div>
    <input type="radio" name="ahahah" /><div>cccccc</div>
    <input type="radio" name="ahahah" /><div>dddddd</div>
    <input type="radio" name="ahahah" /><div>eeeeee</div>
    <input type="radio" name="ahahah" /><div>ffffff</div>
</div>
<div id="testhere1">
    <input type="radio" name="bhbhbh" /><div>gggggg</div>
    <input type="radio" name="bhbhbh" /><div>hhhhhh</div>
    <input type="radio" name="bhbhbh" /><div>iiiiii</div>
    <input type="radio" name="bhbhbh" /><div>jjjjjj</div>
    <input type="radio" name="bhbhbh" /><div>kkkkkk</div>
    <input type="radio" name="bhbhbh" /><div>llllll</div>
</div>
 
Share this answer
 
Comments
maulikshah1990 18-Dec-13 4:55am    
thanks..that helped...
Most Welcome. :)

Please accept this answer, if it has helped you in any way.
This will help others to find the answer in one go and you will also be awarded with some points for this action...

Thanks,
Tadit

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900