Forum Moderators: open
function openclosecommentbox() {
var openstatus = document.getElementById('commentbox').style.visibility;
if (openstatus == 'hidden') {
document.getElementById('commentbox').style.visibility = 'visible';
} else if (openstatus == 'visible') {
document.getElementById('commentbox').style.visibility = 'hidden';
}}
And below I have the link and div:
<p><a href="javascript:openclosecommentbox();">click to open / close comment box</a></p>
<div id="commentbox" style="visibility:hidden;">form here, blah blah...</div>
It just does nothing when I click it...ideas please? Thanks!