Simple Hide/Expand with Javascript
- by user478419
I have created a simple expand/hide test script:
<html>
<head>
<script type="type/javascript"><!--
function showHide(elementid){
if (document.getElementById(elementid).style.display == 'none'){
document.getElementById(elementid).style.display = '';
} else {
document.getElementById(elementid).style.display = 'none';
}
}
//-->
</script>
</head>
<body>
<div><a href="javascript:showHide('div_1035677');">more...</a></div>
<div id="div_1035677" style="display:none">
HIDDEN CONTENT
</div>
</body>
</html>
I get an error message that I can't make any sense of (Object expected on line one).
I don't see any errors in the above code. :-(