View Single Post
Old 10-09-2012, 04:35 PM   PM User | #9
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 453 Times in 451 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
erm...
Code:
#feature{display:none}
here's another way, closer to your original, that keeps track of the number of boxes checked. If it gets to zero the button gets hidden:

Code:
<body>
Would you like to use Feature A?<br>
<input name="Ready[]" type="checkbox" onclick="showFeat(this)" value="1" /><br>
<input name="Ready[]" type="checkbox" onclick="showFeat(this)" value="2" /><br>
<input name="Ready[]" type="checkbox" onclick="showFeat(this)" value="3" /><br>
<input name="Ready[]" type="checkbox" onclick="showFeat(this)" value="4" /><br>
<input name="Ready[]" type="checkbox" onclick="showFeat(this)" value="5" /><br>
<div id="feature"><input name="submit" type="submit" value="submit"></div>
<script>
var ckd=0;
function showFeat(box){
ckd=box.checked?(ckd+1):(ckd-1);
document.getElementById("feature").style.display=ckd==0?"none":"block";
}
</script>
</body>
xelawho is offline   Reply With Quote