brgdotnet
asked on
How to check or uncheck a checkbox using the id of the checkbox
I have a java script function named showInfo(). Show info is passed the name/id of a specific check box control. Now I want to be able to check or uncheck the check box control based upon the control Id that I pass in to the Java script function? I have tried using getElementById but that isn't working. Does
anyone know how I can check the check box based upon the id of the check box control using Java Script?
function showInfo(idOfCheckBox)
{
document.getElementById(id OfCheckBox ).checked = true;
}
anyone know how I can check the check box based upon the id of the check box control using Java Script?
function showInfo(idOfCheckBox)
{
document.getElementById(id
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How are you calling your function?