function LinkHide()
{
document.getElementById('ctl00_ContentPlaceHolder1_txtlink').style.visibility = "hidden";
}
function Hide()
{
var radioButtons = document.getElementsByName("test");
for (var x = 0; x < radioButtons.length; x ++) {
if (radioButtons[x].checked)
{
// alert("You checked " + radioButtons[x].id);
if( radioButtons[x].id=="Radio1")
{
document.getElementById('ctl00_ContentPlaceHolder1_txtlink').style.visibility = "hidden";
document.getElementById('ctl00_ContentPlaceHolder1_file').style.visibility= "visible";
}
else
{
document.getElementById('ctl00_ContentPlaceHolder1_file').style.visibility = "hidden";
document.getElementById('ctl00_ContentPlaceHolder1_txtlink').style.visibility= "visible";
}
}
}
}
============================================
input id="Radio1" type="radio" name="test" value="1" onclick="Hide()" visible="true"
checked
A
input id="Radio2" type="radio" name="test" value="2" onclick="Hide()" visible="false"
B
{
document.getElementById('ctl00_ContentPlaceHolder1_txtlink').style.visibility = "hidden";
}
function Hide()
{
var radioButtons = document.getElementsByName("test");
for (var x = 0; x < radioButtons.length; x ++) {
if (radioButtons[x].checked)
{
// alert("You checked " + radioButtons[x].id);
if( radioButtons[x].id=="Radio1")
{
document.getElementById('ctl00_ContentPlaceHolder1_txtlink').style.visibility = "hidden";
document.getElementById('ctl00_ContentPlaceHolder1_file').style.visibility= "visible";
}
else
{
document.getElementById('ctl00_ContentPlaceHolder1_file').style.visibility = "hidden";
document.getElementById('ctl00_ContentPlaceHolder1_txtlink').style.visibility= "visible";
}
}
}
}
============================================
input id="Radio1" type="radio" name="test" value="1" onclick="Hide()" visible="true"
checked
A
input id="Radio2" type="radio" name="test" value="2" onclick="Hide()" visible="false"
B