I’ve been having some problems getting the value from a checkbox using JavaScript, and I can’t get anywhere. For some reason it just doesn’t want to get the checkbox value. I’d really appreciate it if anyone can help with this problem.
release = document.getElementById('release0');
if (release == undefined) {
alert('Not Found');
} else {
alert(release.checked); // Returns true
}
// Conditional Statement - No alert boxes show up
if (release.checked == true) {
alert('Release');
}
else {
alert('Do not release');
}
alert('Done'); // Never shows up