Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want hide/Visible Radio button using javascript in asp.net.I try some code its not working proper.

Code:

Code For Visible Radio Button
JavaScript
 document.getElementById('RadioButton1').style.display = '';
 document.getElementById('RadioButton1').style.visibility = 'visible';
document.all('RadioButton1').style.visibility = 'visible';


Code For Hide Radio Button
JavaScript
document.getElementById('RadioButton1').style.display = 'none';
document.getElementById('RadioButton1').style.visibility = 'hidden';
document.all('RadioButton1').style.visibility = 'hidden';



Visible code is working fine ,but Invisble code not working proper.Which mean Radio button text not hide but circle(In radio button) only hiding
Posted
Updated 27-Sep-11 16:32pm
v2

1 solution

The caption for the radio button is a separate element. You will need to find that element and hide/display it as well.

Peter
 
Share this answer
 

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