<script type="text/javascript">
function HideDiv(id) {
document.getElementById(id).Style.display = "block";
}
</script>
views:
75answers:
2Lowercase "Style" to "style". JS is case sensitive, Style is undefined.
ItzWarty
2010-04-15 03:56:12
+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
2010-04-15 03:55:19