I am new to javascript. Forgive me if this a dumb mistake...
I am trying to make a function that allows the user to click an image to set the radio button. I want to pass the value to the function from the onclick command to tell the function which radio button to set. It's not working. Here is my code:
<script>
function radioSelect(radioID) {
document.getElementById("radioID").checked = true;
}
</script>
<td><input name="room" type="radio" id="liveR" value="live" /><a href="#" onclick="radioSelect(liveR);"><img src="images/icon-live.jpg" width="50" height="60" /></a></td>