I have a “calculator” which has two radio buttons (link to form) you select before you perform the calculation.
To see my issue, you select the radio button marked “N-12” [to test, we just put “5” in “Slope” and “30” in “Pipe Size” and select “N-12”, then calculate], then perform the calculation everything is fine until you print.
Because people want to have a paper copy of the calculation, they often print the calculated form after it’s completed but if you’ve selected “N-12” and printed the page, it will print with the “Single Wall” radio button selected.
I’ve read that this is a bug and that you can force IE8 to recognize the checked radio button with JS, which is what I did, but it’s not working for IE6 & 7.
This is the JS that I used to correct this problem for IE8:
function toggleRadioCheckbox(el) {
if ( el.getAttribute('checked') != 'checked' ) {
el.setAttribute('checked','checked');
}
else {
el.removeAttribute("checked");
}
}
Does anyone know what I need to do to correct this for IE6 and 7.
Yes. Try this (requires jQuery) solution: