nuttyernurse
Technical User
Hello all!
I am a complete noob, and I will try to explain what I am trying to accomplish. I have several modifiers for diets, and only some of them pertain to the main diet. I would like to make sure the box that is to be hidden is unchecked and then hidden, the code below works, but I was wondering if there was a more elegant solution. This is just a sample, there are 28 modifiers per diet. There is a URL to the file.
function disableregular() {
document.getElementById("cb_calcium_mod").checked=false
document.getElementById("calcium_mod").style.display = 'none'
document.getElementById("cb_cardiac_mod").checked=false
document.getElementById("cardiac_mod").style.display = 'none'
document.getElementById("cb_cho_mod").checked=true
document.getElementById("cb_cho_mod").style.display ='
}
Thank you for helping me out!
I am a complete noob, and I will try to explain what I am trying to accomplish. I have several modifiers for diets, and only some of them pertain to the main diet. I would like to make sure the box that is to be hidden is unchecked and then hidden, the code below works, but I was wondering if there was a more elegant solution. This is just a sample, there are 28 modifiers per diet. There is a URL to the file.
function disableregular() {
document.getElementById("cb_calcium_mod").checked=false
document.getElementById("calcium_mod").style.display = 'none'
document.getElementById("cb_cardiac_mod").checked=false
document.getElementById("cardiac_mod").style.display = 'none'
document.getElementById("cb_cho_mod").checked=true
document.getElementById("cb_cho_mod").style.display ='
}
Thank you for helping me out!