rupurt
asked on
hiding an asp .net radio button list item with javascript
i have a radio button list that i have created and i want to hide on of the items. i use the javascript function
function UpdateLists()
{
var radiobutton = document.getElementById('c tl00_mainc ontent_emp nolist_0')
radiobutton.style.display = "none"
}
however this only hides the radio button. i also have a label which is attached to the button by default but asp .net doesnt seem to assign it an id? so there is no way for me to find the label to hide it.
is there another solution to my problem? thanks in advance
function UpdateLists()
{
var radiobutton = document.getElementById('c
radiobutton.style.display = "none"
}
however this only hides the radio button. i also have a label which is attached to the button by default but asp .net doesnt seem to assign it an id? so there is no way for me to find the label to hide it.
is there another solution to my problem? thanks in advance
Depending on where it is located you could put both the label and the button in the same <td> or <tr> tag and give that tag an id to hide or display. You could do it with a div tag as well
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
oops I missed that .Net part!! I can't wait to get my copy of visual studio 2005...
If the radio buttons are all in a <tr> </tr>, then I can show you how to toggle that row without ID.