Private Sub Radio1_OnClick()
If me.Radio1 = true then
me.Radio2.enabled = false
me.Radio2 = false
Else
me.Radio2.enabled = true
end if
End Sub
What the heck? You're recommending VBScript? Is that even VBScript?
Translated:
Code:
<input type="radio" onclick="seafood(this.form);">
<script type="text/javascript">
function seafood(frm) {
if(frm.elements.Radio1.checked)
frm.elements.Radio2.enabled = frm.elements.Radio2.checked = false;
else
frm.elements.Radio2.enabled = true;
}
</script>
Note that I'm not vouching for this code, I just translated it. 
A better idea, if more complex, is:
Code:
<script type="text/javascript">
function setupDependencies() {
for(var i = 0; i < arguments.length; ++i)
for(var j = 0, e = window.document.forms[arguments[i]].elements; j < e.length; ++j)
e[j].onchange = function() {
this.form.calculateDependencies();
};
(window.document.forms.[arguments[i]].calculateDependencies = function() {
for(var i = 0, e = this.elements; i < e.length; ++i)
for(var j = 0, f = e[i].className.split(' '); j < f.length; ++j)
if(f[j].indexOf("depends-") === 0) {
if(!e[f[j].substr(8)].checked) {
e[i].style.display = "";
break;
} else e[i].style.display = "";
} else if(f[j].indexOf("conflicts-") === 0)
if(e[f[j].substr(10)].checked) {
e[i].style.display = "none";
break;
} else e[i].style.display = "";
})();
}
window.onload = function() {
setupDependencies("form1Name" /*, ... */);
};
</script>
<form action="" name="form1Name">
<p>
<input type="radio" name="linux">
<input type="checkbox" name="ssh" class="depends-linux">
<input type="radio" name="windows">
<input type="checkbox" name="asp" class="depends-windows">
</p>
</form>
Note that it's 0346 and I'm tired, so it probably won't actually work.
Apologies for the virtually unreadable code, with the same excuse.
Something to play with, though.
Bookmarks