tags:

views:

75

answers:

2
<script type="text/javascript">
function HideDiv(id) {
    document.getElementById(id).Style.display = "block";
}
</script>
+1  A: 

document.getElementById(id).style.display = "none";

nickf
Lowercase "Style" to "style". JS is case sensitive, Style is undefined.
ItzWarty
+5  A: 

The correct syntax is element.style, not element.Style. "style" is a CSSStyleDeclaration object, "Style" is undefined. As such, for you, the code you need is:
document.getElementById(id).style.display = "none";
Helpful reference: http://www.w3schools.com/css/pr_class_display.asp

ItzWarty