okay, I have two radio buttons on a web page with two different functions but the second is not working. So my code looks like the following:
<input onclick='fillShipping();' name='address' type="radio" id='same'>Use Address for Shipping<br>
<input onclick='clear();' name='address' type="radio" id='different'>Use Seperate Address for Shipping
The first function, with the onclick event, works perfectly fine. The second function, named clear(), does not fire. Nothing happens at all. I'm not quite sure why this is happening.
The code for the clear function is the following:
function clear() {
if (document.getElementById('different').checked){
alert('Hi');
}
}
Nothing fancy and yet nothing happens. Am I missing something basic with using radio buttons and functions?